diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 27 |
1 files changed, 22 insertions, 5 deletions
@@ -4,18 +4,33 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; + disko.url = "github:nix-community/disko"; + disko.inputs.nixpkgs.follows = "nixpkgs"; + discidurl.url = "git+https://git.hwebs.info/discidurl?ref=main"; discidurl.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, ... }@inputs: + let + # A machine is common/ + its own machines/<name> module, plus any extra + # inline modules (e.g. per-machine overlays). + mkMachine = + machineModule: extraModules: + nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./common + machineModule + ] + ++ extraModules; + }; + in { - nixosConfigurations.kusanagi = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./configuration.nix - ./programs.nix + nixosConfigurations = { + kusanagi = mkMachine ./machines/kusanagi [ { nixpkgs.overlays = [ (import ./overlays/haunt.nix) @@ -23,6 +38,8 @@ ]; } ]; + + enzo = mkMachine ./machines/enzo [ ]; }; }; } |
