diff options
Diffstat (limited to 'users/aspen/system')
-rw-r--r-- | users/aspen/system/home/machines/ogopogo.nix | 2 | ||||
-rw-r--r-- | users/aspen/system/home/modules/i3.nix | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/users/aspen/system/home/machines/ogopogo.nix b/users/aspen/system/home/machines/ogopogo.nix index 46cf7232ec14..37396a5aa1be 100644 --- a/users/aspen/system/home/machines/ogopogo.nix +++ b/users/aspen/system/home/machines/ogopogo.nix @@ -23,7 +23,7 @@ in system.machine = { wirelessInterface = "wlp4s0"; i3FontSize = 9; - battery = false; + battery = null; }; home.packages = with pkgs; [ diff --git a/users/aspen/system/home/modules/i3.nix b/users/aspen/system/home/modules/i3.nix index 34bd7f1b2ac6..58ec3d281460 100644 --- a/users/aspen/system/home/modules/i3.nix +++ b/users/aspen/system/home/modules/i3.nix @@ -39,9 +39,9 @@ in }; battery = mkOption { - description = "Does this system have a battery?"; - default = true; - type = types.bool; + description = "Battery index for this system's battery"; + default = 0; + type = types.nullOr types.int; }; }; }; @@ -242,8 +242,8 @@ in order += "wireless ${config.system.machine.wirelessInterface}" # order += "ethernet enp3s0f0" order += "cpu_usage" - ${lib.optionalString (config.system.machine.battery) '' - order += "battery 0" + ${lib.optionalString (!isNull config.system.machine.battery) '' + order += "battery ${toString config.system.machine.battery}" ''} # order += "volume master" order += "time" @@ -263,7 +263,7 @@ in format_down = "E: -" } - battery 0 { + battery ${toString config.system.machine.battery} { format = "%status %percentage" path = "/sys/class/power_supply/BAT%d/uevent" low_threshold = 10 |