diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..0a5e315 --- /dev/null +++ b/flake.nix @@ -0,0 +1,34 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-25.05"; + inputs.nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs.disko.url = "github:nix-community/disko"; + inputs.disko.inputs.nixpkgs.follows = "nixpkgs"; + inputs.agenix.url = "github:ryantm/agenix"; + + outputs = { + nixpkgs, + nixpkgs-unstable, + disko, + agenix, + ... + } @ inputs: let + lib = nixpkgs.lib; + inherit (lib) filter hasSuffix; + listModules' = path: lib.filesystem.listFilesRecursive path |> filter (hasSuffix ".nix"); + unstable = import nixpkgs-unstable {system = "x86_64-linux";}; + in { + nixosConfigurations.experimental-nixos = nixpkgs.lib.nixosSystem rec { + system = "x86_64-linux"; + specialArgs = {inherit inputs unstable nixpkgs-unstable;}; + modules = + [ + disko.nixosModules.disko + agenix.nixosModules.default + ./hardware-configuration.nix + ] + ++ (listModules' modules/common) + ++ (listModules' hosts/experimental-nixos) + ++ (listModules' modules/disks/bcachefs); + }; + }; +} |
