diff --git a/modules/services/cbatticon.nix b/modules/services/cbatticon.nix index 1216878ca..1616b2dcd 100644 --- a/modules/services/cbatticon.nix +++ b/modules/services/cbatticon.nix @@ -24,7 +24,7 @@ let ++ optional (cfg.updateIntervalSeconds != null) "--update-interval ${toString cfg.updateIntervalSeconds}" ++ optional (cfg.hideNotification != null && cfg.hideNotification) - "--hide-notification"); + "--hide-notification" ++ optional (cfg.batteryId != null) cfg.batteryId); in { meta.maintainers = [ maintainers.pmiddend ]; @@ -94,6 +94,15 @@ in { default = null; description = "Hide the notification popups."; }; + + batteryId = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + ID of the battery to monitor. List with {command}`cbatticon -p`. + Defaults to the first entry in the list. + ''; + }; }; };