diff --git a/devices/ellaca/default.nix b/devices/ellaca/default.nix index 24e9a75..bff268a 100644 --- a/devices/ellaca/default.nix +++ b/devices/ellaca/default.nix @@ -71,7 +71,4 @@ enable32Bit = true; }; }; - - system.stateVersion = "24.05"; - home-manager.users.twoneis.home.stateVersion = "24.11"; } diff --git a/devices/ellaca/options.nix b/devices/ellaca/options.nix index cd940d3..21699af 100644 --- a/devices/ellaca/options.nix +++ b/devices/ellaca/options.nix @@ -10,4 +10,7 @@ withGames = false; hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input"; + + stateVersion = "24.05"; + hmStateVersion = "24.11"; } diff --git a/devices/inkvine/default.nix b/devices/inkvine/default.nix index 68dae48..91b1ca5 100644 --- a/devices/inkvine/default.nix +++ b/devices/inkvine/default.nix @@ -66,7 +66,4 @@ enable32Bit = true; }; }; - - system.stateVersion = "24.05"; - home-manager.users.twoneis.home.stateVersion = "24.11"; } diff --git a/devices/inkvine/options.nix b/devices/inkvine/options.nix index 55c775e..b04a82a 100644 --- a/devices/inkvine/options.nix +++ b/devices/inkvine/options.nix @@ -10,4 +10,7 @@ withGames = false; hwmonPath = "/sys/class/hwmon/hwmon4/temp1_input"; + + stateVersion = "24.05"; + hmStateVersion = "24.11"; } diff --git a/devices/pleniscenta/default.nix b/devices/pleniscenta/default.nix index 9642ec4..313c91b 100644 --- a/devices/pleniscenta/default.nix +++ b/devices/pleniscenta/default.nix @@ -64,7 +64,4 @@ enable32Bit = true; }; }; - - system.stateVersion = "24.05"; - home-manager.users.twoneis.home.stateVersion = "24.11"; } diff --git a/devices/pleniscenta/options.nix b/devices/pleniscenta/options.nix index 364139f..d5936aa 100644 --- a/devices/pleniscenta/options.nix +++ b/devices/pleniscenta/options.nix @@ -10,4 +10,7 @@ withGames = false; hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input"; + + stateVersion = "24.05"; + hmStateVersion = "24.11"; } diff --git a/modules/default.nix b/modules/default.nix index 142e880..6cc2320 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,4 +1,4 @@ -{ inputs, pkgs, lib, ... }: { +{ inputs, pkgs, lib, config, ... }: { imports = [ ./containers ./games @@ -79,4 +79,6 @@ description = "twoneis"; extraGroups = [ "networkmanager" "wheel" ]; }; + + system.stateVersion = config.stateVersion; } diff --git a/modules/home/default.nix b/modules/home/default.nix index cd01e44..a363b07 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{ config, ... }: { home-manager = { useGlobalPkgs = true; useUserPackages = true; @@ -7,6 +7,8 @@ home = { username = "twoneis"; homeDirectory = "/home/twoneis"; + + stateVersion = config.hmStateVersion; }; programs.home-manager.enable = true; diff --git a/options.nix b/options.nix index 3186ca8..969eb5d 100644 --- a/options.nix +++ b/options.nix @@ -15,5 +15,17 @@ default = null; example = "/sys/class/hwmon/hwmon1/temp1_input"; }; + + stateVersion = mkOption { + type = with types; nullOr str; + default = null; + example = "24.05"; + }; + + hmStateVersion = mkOption { + type = with types; nullOr str; + default = null; + example = "24.11"; + }; }; }