feat: move stateVersion to flake.nix
This commit is contained in:
parent
58e174c3e8
commit
558a5241bf
3 changed files with 10 additions and 12 deletions
18
flake.nix
18
flake.nix
|
|
@ -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)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue