From 138e5005e17a04343ddd4c9dfb7d0dc65c9f94a3 Mon Sep 17 00:00:00 2001 From: andrey_varnavskiy Date: Sat, 30 Nov 2024 06:57:46 +0500 Subject: [PATCH] add stateVersion to hosts --- flake.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 7f503fe..359997d 100644 --- a/flake.nix +++ b/flake.nix @@ -23,10 +23,10 @@ stateVersion = "24.05"; user = "amper"; hosts = [ - "slim3" + { hostname = "slim3"; stateVersion = "24.05"; } ]; - makeSystem = { hostname }: nixpkgs.lib.nixosSystem { + makeSystem = { hostname, stateVersion }: nixpkgs.lib.nixosSystem { system = system; specialArgs = { inherit inputs stateVersion hostname user; @@ -38,10 +38,12 @@ }; in { - nixosConfigurations = nixpkgs.lib.foldl' (configs: hostname: - configs // { - "${hostname}" = makeSystem { inherit hostname; }; - }) {} hosts; + nixosConfigurations = nixpkgs.lib.foldl' (configs: host: + configs // { + "${host.hostname}" = makeSystem { + inherit (host) hostname stateVersion; + }; + }) {} hosts; homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.${system};