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