diff --git a/machines/luna/configuration.nix b/machines/luna/configuration.nix index da477c9..02eb8f8 100644 --- a/machines/luna/configuration.nix +++ b/machines/luna/configuration.nix @@ -6,10 +6,9 @@ ]; horseman.username = "horseman"; + horseman.stateVersion = "24.11"; networking.hostName = "luna"; networking.extraHosts = "127.0.0.1 koala.rails.local"; - - system.stateVersion = "24.11"; } diff --git a/machines/solis/configuration.nix b/machines/solis/configuration.nix index a33ff37..c7c492c 100644 --- a/machines/solis/configuration.nix +++ b/machines/solis/configuration.nix @@ -6,10 +6,9 @@ ]; horseman.username = "horseman"; + horseman.stateVersion = "24.11"; networking.hostName = "solis"; networking.firewall.allowedTCPPorts = [3000 3001]; - - system.stateVersion = "24.11"; } diff --git a/machines/terra/configuration.nix b/machines/terra/configuration.nix index d1c44e6..8c328e1 100644 --- a/machines/terra/configuration.nix +++ b/machines/terra/configuration.nix @@ -6,8 +6,7 @@ ]; horseman.username = "horseman"; + horseman.stateVersion = "24.11"; networking.hostName = "terra"; - - system.stateVersion = "24.11"; } diff --git a/modules/base/nix.nix b/modules/base/nix.nix index 511adae..1f7d2e8 100644 --- a/modules/base/nix.nix +++ b/modules/base/nix.nix @@ -7,6 +7,7 @@ }: let inherit (lib) mkEnableOption mkIf; cfg = config.horseman.base.nix; + stateVersion = config.horseman.stateVersion; in { options = { horseman.base.nix = { @@ -40,5 +41,7 @@ in { experimental-features = "nix-command flakes"; auto-optimise-store = true; }; + + system.stateVersion = stateVersion; }; } diff --git a/modules/default.nix b/modules/default.nix index 1a610f1..f53175e 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -15,6 +15,7 @@ in { options = { horseman = { username = mkOption {type = types.str;}; + stateVersion = mkOption { type = types.str; }; }; }; } diff --git a/modules/users/default.nix b/modules/users/default.nix index fc8c50d..e5a58a1 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -8,6 +8,7 @@ inherit (lib) mkEnableOption mkIf; cfg = config.horseman.users.default; username = config.horseman.username; + stateVersion = config.horseman.stateVersion; in { options = { horseman.users.default = { @@ -22,7 +23,7 @@ in { home = { username = username; homeDirectory = "/home/${username}"; - stateVersion = "24.11"; + stateVersion = stateVersion; }; programs = {