From c2766e82afb59da85234ea7fb6debbcec1812f6f Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Wed, 12 Nov 2025 20:01:54 -0600 Subject: [PATCH] fix --- .../matt@macbook-pro-nixos/default.nix | 17 +++---------- .../x86_64-linux/matt@matt-nixos/default.nix | 25 ++++++------------- modules/home/programs/waybar/default.nix | 21 +++------------- modules/home/programs/waybar/options.nix | 17 ++++--------- 4 files changed, 20 insertions(+), 60 deletions(-) diff --git a/homes/aarch64-linux/matt@macbook-pro-nixos/default.nix b/homes/aarch64-linux/matt@macbook-pro-nixos/default.nix index b8bbadb..85ab330 100755 --- a/homes/aarch64-linux/matt@macbook-pro-nixos/default.nix +++ b/homes/aarch64-linux/matt@macbook-pro-nixos/default.nix @@ -101,19 +101,10 @@ in layer = "bottom"; - modules-right = [ - "temperature" - "temperature#gpu" - "keyboard-state#capslock" - "keyboard-state#numlock" - "wireplumber#sink" - "bluetooth" - "network" - "idle_inhibitor" - "clock" - "battery" - "custom/weather" - ]; + temperature = { + cpu.enable = true; + gpu.enable = true; + }; extraModules = { "custom/lights" = { diff --git a/homes/x86_64-linux/matt@matt-nixos/default.nix b/homes/x86_64-linux/matt@matt-nixos/default.nix index 4c9e286..2f4f842 100755 --- a/homes/x86_64-linux/matt@matt-nixos/default.nix +++ b/homes/x86_64-linux/matt@matt-nixos/default.nix @@ -82,7 +82,7 @@ in autostartCommands = [ "[silent] firefox" - "[silent] vesktop" + "[silent] discord" "[silent] chromium --app=\"https://music.apple.com\"" "[silent] steam" ]; @@ -94,7 +94,7 @@ in keybinds = { bind = [ "$mod, A, exec, chromium --app=\"https://music.apple.com\"" - "$mod, C, exec, vesktop" + "$mod, C, exec, discord" "$mod, G, exec, steam" ]; }; @@ -128,22 +128,11 @@ in layer = "bottom"; - networkInterface = "wlp9s0"; - - modules-right = [ - "custom/lights" - "temperature" - "temperature#gpu" - "keyboard-state#capslock" - "keyboard-state#numlock" - "wireplumber#sink" - "wireplumber#source" - "bluetooth" - "network" - "idle_inhibitor" - "clock" - "custom/weather" - ]; + network.interface = "wlp9s0"; + temperature = { + cpu.enable = true; + gpu.enable = true; + }; extraModules = { "custom/lights" = { diff --git a/modules/home/programs/waybar/default.nix b/modules/home/programs/waybar/default.nix index fb4ac07..8e8762f 100755 --- a/modules/home/programs/waybar/default.nix +++ b/modules/home/programs/waybar/default.nix @@ -4,19 +4,6 @@ let cfg = config.mjallen.programs.waybar; palette = import cfg.theme.file; - # Back-compat shims for deprecated options - rightModules = - if builtins.hasAttr "modules-right" cfg && (cfg."modules-right" != [ ]) then - cfg."modules-right" - else - cfg.layout.right; - - netIf = - if (cfg ? networkInterface) && (cfg.networkInterface != "wlan0") then - cfg.networkInterface - else - cfg.network.interface; - defaultOpacity = palette.tokens.opacity or "opacity: 0.85;"; defaultBorderRadius = palette.tokens.borderRadius or "border-radius: 1rem;"; defaultCenterOptions = @@ -317,7 +304,7 @@ in enable = true; systemd.enable = true; - settings = ({ + settings = { mainBar = ( (mkMerge [ { @@ -332,7 +319,7 @@ in # Module Layout modules-left = cfg.layout.left; modules-center = cfg.layout.center; - modules-right = rightModules; + modules-right = cfg.layout.right; # Base module definitions always present unless individually gated "hyprland/workspaces" = { @@ -365,7 +352,7 @@ in }; network = { - interface = netIf; + interface = cfg.network.interface; on-click = "nm-connection-editor"; format = "{icon}"; tooltip-format = "{ifname} via {gwaddr} 󰊗"; @@ -589,7 +576,7 @@ in ]) // cfg.extra.settings ); - }) + } // cfg.extraModules; # keep legacy top-level extra modules for compatibility style = baseStyle + (cfg.extra.style or "") + (cfg.extraModulesStyle or ""); diff --git a/modules/home/programs/waybar/options.nix b/modules/home/programs/waybar/options.nix index a1290e0..f869663 100644 --- a/modules/home/programs/waybar/options.nix +++ b/modules/home/programs/waybar/options.nix @@ -23,18 +23,6 @@ in description = "Waybar layer (compat). Prefer layout + feature flags."; }; - modules-right = mkOption { - type = listOf str; - default = [ ]; - description = "DEPRECATED: use layout.right."; - }; - - networkInterface = mkOption { - type = str; - default = "wlan0"; - description = "DEPRECATED: use network.interface."; - }; - extraModules = mkOption { type = attrs; default = { }; @@ -132,6 +120,11 @@ in cpu = mkOption { type = submodule { options = { + enable = mkOption { + type = bool; + default = true; + description = "Enable CPU temperature module."; + }; hwmonPath = mkOption { type = str; default = "/sys/class/hwmon/hwmon4/temp1_input";