diff --git a/hosts/morty/home-config.nix b/hosts/morty/home-config.nix index 67f4eb6..6a2d52d 100644 --- a/hosts/morty/home-config.nix +++ b/hosts/morty/home-config.nix @@ -19,10 +19,6 @@ desktop.sway = { enable = true; kanshi = true; - waybar = { - laptop = true; - gpuThermal.enable = false; - }; }; }; } diff --git a/hosts/mrmeeseeks/home-config.nix b/hosts/mrmeeseeks/home-config.nix index a495eae..6e3ef2c 100644 --- a/hosts/mrmeeseeks/home-config.nix +++ b/hosts/mrmeeseeks/home-config.nix @@ -19,17 +19,6 @@ desktop.sway = { enable = true; kanshi = false; - waybar = { - laptop = false; - gpuThermal = { - enable = true; - hmonPath = "/sys/class/hwmon/hwmon1/temp1_input"; - }; - cpuThermal = { - hwmonPathAbs = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/"; - inputFilename = "temp3_input"; - }; - }; }; }; } diff --git a/modules/home-manager/desktop/sway/default.nix b/modules/home-manager/desktop/sway/default.nix index 70c4aff..ec4e4b3 100644 --- a/modules/home-manager/desktop/sway/default.nix +++ b/modules/home-manager/desktop/sway/default.nix @@ -12,43 +12,6 @@ in default = false; description = "configure laptop mode"; }; - - waybar = { - laptop = mkOption { - type = types.bool; - default = false; - description = "Enable laptop element on Waybar"; - }; - - cpuThermal = { - - hwmonPathAbs = mkOption { - type = types.str; - default = ""; - description = "CPU thermal hwmon absolute path"; - }; - - inputFilename = mkOption { - type = types.str; - default = ""; - description = "CPU thermal hwmon file"; - }; - }; - - gpuThermal = { - enable = mkOption { - type = types.bool; - default = false; - description = "enable waybar GPU temperature"; - }; - - hmonPath = mkOption { - type = types.str; - default = ""; - description = "Thermal zone for CPU"; - }; - }; - }; }; imports = [ ./includes/fuzzel.nix diff --git a/modules/home-manager/desktop/sway/includes/waybar.nix b/modules/home-manager/desktop/sway/includes/waybar.nix index 7ff9f80..6c91c37 100644 --- a/modules/home-manager/desktop/sway/includes/waybar.nix +++ b/modules/home-manager/desktop/sway/includes/waybar.nix @@ -1,10 +1,7 @@ -{lib, config, ...}: +{config, lib, ...}: with lib; -let - cfg = config.modules.desktop.sway; -in { - config = mkIf cfg.enable { + config = mkIf config.modules.desktop.sway.enable { programs.waybar = { enable = true; systemd = { @@ -24,30 +21,12 @@ in modules-right = [ "network" "custom/sep" - ] ++ ( - if cfg.waybar.laptop then [ - "backlight" - "battery" - "custom/sep" - ] - else [ - ] - ) ++ - [ - + "backlight" + "battery" + "custom/sep" "memory" "cpu" - "temperature" - "custom/sep" - ] ++ ( - if cfg.waybar.gpuThermal.enable then [ - "temperature#gpu" - "custom/sep" - ] - else [ - ] - ) ++ - [ + "custom/sep" "pulseaudio" "custom/sep" "clock" @@ -121,13 +100,7 @@ in "temperature" = { "critical-threshold" = 80; "format" = "{temperatureC}°C  "; - "hwmon-path-abs" = "${cfg.waybar.cpuThermal.hwmonPathAbs}"; - "input-filename" = "${cfg.waybar.cpuThermal.inputFilename}"; - }; - "temperature#gpu" = { - "critical-threshold" = 80; - "format" = "GPU: {temperatureC}°C  "; - "hwmon-path" = "${cfg.waybar.gpuThermal.hmonPath}"; + "thermal-zone" = "6"; }; "backlight" = { "format" = "{percent}% {icon}";