From 558a5241bfaaa7c01db8c95beb0f12ae5be624e9 Mon Sep 17 00:00:00 2001 From: Jacob Bachmann Date: Fri, 5 Sep 2025 13:32:33 +0200 Subject: [PATCH] feat: move stateVersion to flake.nix --- flake.nix | 18 ++++++++++-------- hosts/PABU/system.nix | 2 -- modules/core/default.nix | 2 -- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/flake.nix b/flake.nix index bc50437..b4820b5 100644 --- a/flake.nix +++ b/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) ); }; } diff --git a/hosts/PABU/system.nix b/hosts/PABU/system.nix index 23b07a6..40706aa 100644 --- a/hosts/PABU/system.nix +++ b/hosts/PABU/system.nix @@ -22,6 +22,4 @@ security.sudo.wheelNeedsPassword = false; - system.stateVersion = "24.05"; - } diff --git a/modules/core/default.nix b/modules/core/default.nix index f44272b..f69f4b7 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -38,8 +38,6 @@ }; }; - system.stateVersion = "23.05"; - time.timeZone = "Europe/Berlin"; i18n = {