waybar: Make temperature module input path configurable
This commit is contained in:
parent
83c0196bf3
commit
c332c4a78b
2 changed files with 8 additions and 2 deletions
|
@ -13,6 +13,11 @@ in
|
|||
enable = mkEnableOption "Enable waybar";
|
||||
sway = mkEnableOption "sway";
|
||||
river = mkEnableOption "river";
|
||||
|
||||
cpuTempPath = mkOption {
|
||||
description = "The path to the CPU temperature sensor in sysfs";
|
||||
type = types.path;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -168,7 +173,7 @@ in
|
|||
};
|
||||
|
||||
"temperature" = {
|
||||
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||
hwmon-path = cfg.cpuTempPath;
|
||||
critical-threshold = 80;
|
||||
interval = 5;
|
||||
format = "{icon} {temperatureC}°C";
|
||||
|
|
|
@ -66,7 +66,7 @@ in
|
|||
foot = {
|
||||
enable = true;
|
||||
server = false;
|
||||
fontSize = 12;
|
||||
fontSize = 16;
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
|
@ -166,6 +166,7 @@ in
|
|||
waybar = {
|
||||
enable = true;
|
||||
sway = true;
|
||||
cpuTempPath = "/sys/class/hwmon/hwmon1/temp2_input";
|
||||
};
|
||||
};
|
||||
services = {
|
||||
|
|
Loading…
Reference in a new issue