flake: deduplicate nixosSystem specialArgs
1 file changed, 22 insertions(+), 10 deletions(-)
changed files
M flake.nix → flake.nix
@@ -69,6 +69,22 @@ # Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'. forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + nixosSystem = + { + system, + modules, + ... + }@args: + nixpkgs.lib.nixosSystem ( + { + inherit system modules; + specialArgs = { + inherit inputs; + }; + } + // args + ); + mkHomeConfiguration = { modules, system }: home-manager.lib.homeManagerConfiguration {@@ -97,11 +113,11 @@ in { nixosConfigurations = { # build with `nixos-rebuild build-image --image-variant iso-installer` - minimal-iso = nixpkgs.lib.nixosSystem { + minimal-iso = nixosSystem { system = "x86_64-linux"; modules = [ ./system/hosts/installer.nix ]; }; - prefect = nixpkgs.lib.nixosSystem { + prefect = nixosSystem { system = "x86_64-linux"; modules = ( with nixos-hardware.nixosModules;@@ -115,9 +131,8 @@ "${nixos-hardware}/common/gpu/nvidia/ada-lovelace" ] ); }; - r5 = nixpkgs.lib.nixosSystem { + r5 = nixosSystem { system = "aarch64-linux"; - specialArgs = { inherit inputs; }; modules = [ agenix.nixosModules.default srvos.nixosModules.server@@ -126,9 +141,8 @@ ./system/hosts/r5.nix ./system/hosts/r5-hardware.nix ]; }; - hasel = nixpkgs.lib.nixosSystem { + hasel = nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; }; modules = [ srvos.nixosModules.server agenix.nixosModules.default@@ -137,9 +151,8 @@ ./packages/modules/nixos/bark.nix ./system/hosts/hasel.nix ]; }; - smrk = nixpkgs.lib.nixosSystem { + smrk = nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; }; modules = [ srvos.nixosModules.server vpsadminos.nixosConfigurations.containerStable@@ -149,9 +162,8 @@ ./packages/modules/nixos/bark.nix ./system/hosts/smrk.nix ]; }; - buk = nixpkgs.lib.nixosSystem { + buk = nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; }; modules = [ srvos.nixosModules.server vpsadminos.nixosConfigurations.containerStable