feat: move stateVersion to flake.nix

This commit is contained in:
Jacob Bachmann 2025-09-05 13:32:33 +02:00
parent 58e174c3e8
commit 558a5241bf
Signed by: bchmnn
GPG key ID: 732A612DAD28067D
3 changed files with 10 additions and 12 deletions

View file

@ -21,15 +21,17 @@
... ...
}@inputs: }@inputs:
let let
mkSystem = host: { uncurry = f: args: f (builtins.elemAt args 0) (builtins.elemAt args 1) (builtins.elemAt args 2);
"${host}" = nixpkgs.lib.nixosSystem rec { mkSystem = host: sys: state: {
system = "x86_64-linux"; "${host}" = nixpkgs.lib.nixosSystem {
system = sys;
specialArgs = inputs; specialArgs = inputs;
modules = [ modules = [
(./hosts + "/${host}") (./hosts + "/${host}")
{ system.stateVersion = state; }
agenix.nixosModules.default agenix.nixosModules.default
disko.nixosModules.disko disko.nixosModules.disko
{ environment.systemPackages = [ agenix.packages.${system}.default ]; } { environment.systemPackages = [ agenix.packages.${sys}.default ]; }
]; ];
}; };
}; };
@ -37,10 +39,10 @@
{ {
nixosConfigurations = nixpkgs.lib.mergeAttrsList ( nixosConfigurations = nixpkgs.lib.mergeAttrsList (
nixpkgs.lib.forEach [ nixpkgs.lib.forEach [
"APPA" [ "APPA" "x86_64-linux" "23.05" ]
"MOMO" [ "MOMO" "x86_64-linux" "23.05" ]
"PABU" [ "PABU" "x86_64-linux" "24.05" ]
] mkSystem ] (uncurry mkSystem)
); );
}; };
} }

View file

@ -22,6 +22,4 @@
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
system.stateVersion = "24.05";
} }

View file

@ -38,8 +38,6 @@
}; };
}; };
system.stateVersion = "23.05";
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
i18n = { i18n = {