diff --git a/home/x/i3bar.nix b/home/x/i3bar.nix index 2f8b4c8..dadde9b 100644 --- a/home/x/i3bar.nix +++ b/home/x/i3bar.nix @@ -2,8 +2,21 @@ let isEnabled = config.my.home.x.enable; i3BarTheme = config.my.theme.i3BarTheme; + cfg = config.my.home.x.i3bar; in { + options.my.home.x.i3bar = with lib; { + temperature.chip = mkOption { + type = types.str; + example = "coretemp-isa-*"; + default = ""; + }; + temperature.inputs = mkOption { + type = types.listOf types.str; + example = ["Core 0" "Core 1" "Core 2" "Core 3"]; + default = ""; + }; + }; config = lib.mkIf isEnabled { home.packages = with pkgs; [ @@ -57,10 +70,8 @@ in collapsed = false; interval = 10; format = "{max}"; - # FIXME: specific to my AMD Ryzen CPU. Make this depend on - # hostname or something else - chip = "k10temp-pci-*"; - inputs = [ "Tccd1" ]; + chip = cfg.temperature.chip; + inputs = cfg.temperature.inputs; } { block = "networkmanager"; diff --git a/hosts/boreal/home.nix b/hosts/boreal/home.nix index f1e3ec8..006cb4a 100644 --- a/hosts/boreal/home.nix +++ b/hosts/boreal/home.nix @@ -3,6 +3,8 @@ home-manager.users.alarsyo = { # Keyboard settings & i3 settings my.home.x.enable = true; + my.home.x.i3bar.temperature.chip = "k10temp-pci-*"; + my.home.x.i3bar.temperature.inputs = [ "Tccd1" ]; my.home.x.cursor.enable = true; my.home.alacritty.enable = true; my.home.emacs.enable = true; diff --git a/hosts/zephyrus/home.nix b/hosts/zephyrus/home.nix index 08f11ad..806dff4 100644 --- a/hosts/zephyrus/home.nix +++ b/hosts/zephyrus/home.nix @@ -3,6 +3,8 @@ home-manager.users.alarsyo = { # Keyboard settings & i3 settings my.home.x.enable = true; + my.home.x.i3bar.temperature.chip = "coretemp-isa-*"; + my.home.x.i3bar.temperature.inputs = ["Core 0" "Core 1" "Core 2" "Core 3"]; my.home.x.cursor.enable = true; my.home.alacritty.enable = true; my.home.emacs.enable = true;