dotfiles/etcnixos/flake.nix
2024-10-20 16:35:33 -04:00

66 lines
1.4 KiB
Nix

{
description = "A simple NixOS flake";
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/master";
lanzaboote = {
url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
wivrn.url = "github:NixOS/nixpkgs/pull/350069/head";
chaotic = {
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
lanzaboote,
nixos-hardware,
chaotic,
agenix,
...
}@inputs:
let
username = "primary";
hostname = nixpkgs.lib.strings.removeSuffix "\n" (builtins.readFile /etc/hostname);
system = "x86_64-linux";
pkgs = import nixpkgs {
config.allowUnfreePredicate =
pkg:
builtins.elem (nixpkgs.lib.getName pkg) [
"steam-unwrapped"
"steam"
];
};
in
{
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs username hostname;
};
inherit pkgs;
modules = [
./system-${hostname}.nix
chaotic.nixosModules.default
agenix.nixosModules.default
];
};
};
}