move state versions to option (mainly for hm state version per device without forcing every device to use hm module)

This commit is contained in:
twoneis 2024-07-11 15:08:00 +02:00
parent 16859b559b
commit fdc6c1945e
9 changed files with 27 additions and 11 deletions

View file

@ -71,7 +71,4 @@
enable32Bit = true;
};
};
system.stateVersion = "24.05";
home-manager.users.twoneis.home.stateVersion = "24.11";
}

View file

@ -10,4 +10,7 @@
withGames = false;
hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input";
stateVersion = "24.05";
hmStateVersion = "24.11";
}

View file

@ -66,7 +66,4 @@
enable32Bit = true;
};
};
system.stateVersion = "24.05";
home-manager.users.twoneis.home.stateVersion = "24.11";
}

View file

@ -10,4 +10,7 @@
withGames = false;
hwmonPath = "/sys/class/hwmon/hwmon4/temp1_input";
stateVersion = "24.05";
hmStateVersion = "24.11";
}

View file

@ -64,7 +64,4 @@
enable32Bit = true;
};
};
system.stateVersion = "24.05";
home-manager.users.twoneis.home.stateVersion = "24.11";
}

View file

@ -10,4 +10,7 @@
withGames = false;
hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input";
stateVersion = "24.05";
hmStateVersion = "24.11";
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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";
};
};
}