hwmon path as option

This commit is contained in:
twoneis 2024-06-13 16:13:24 +02:00
parent 57b9da65cb
commit 5650a9c4b7
7 changed files with 16 additions and 3 deletions

View file

@ -10,4 +10,6 @@
withVM = false;
withContainers = true;
withGames = false;
hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input";
}

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: {
{ pkgs, ... }: {
imports = [
./options.nix
];

View file

@ -10,4 +10,6 @@
withVM = false;
withContainers = false;
withGames = false;
hwmonPath = "/sys/class/hwmon/hwmon4/temp1_input";
}

View file

@ -10,4 +10,6 @@
withVM = false;
withContainers = false;
withGames = false;
hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input";
}

View file

@ -40,7 +40,7 @@ in lib.mkIf (osConfig.withNiri) {
format = "{usage}%";
};
"temperature" = {
hwmon-path = "/sys/class/hwmon/hwmon4/temp1_input";
hwmon-path = osConfig.hwmonPath;
format = "{temperatureC}°C ";
interval = 10;
tooltip = false;

View file

@ -11,5 +11,10 @@
withVM = mkEnableOption "Enable VM related configuration";
withContainers = mkEnableOption "Enable container support";
withGames = mkEnableOption "Enable games";
hwmonPath = mkOption {
type = with types; nullOr str;
default = null;
};
};
}

View file

@ -35,7 +35,9 @@
];
};
# Lenovo Thinkpad
# Lenovo Thinkpad T540p
# Intel i7-4710MQ
# 8GB RAM
inkvine = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {