mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
cbatticon: add package to options
This commit is contained in:
parent
d47259b685
commit
ca2ab1d877
1 changed files with 4 additions and 4 deletions
|
|
@ -9,8 +9,6 @@ let
|
|||
|
||||
cfg = config.services.cbatticon;
|
||||
|
||||
package = pkgs.cbatticon;
|
||||
|
||||
makeCommand =
|
||||
commandName: commandArg:
|
||||
optional (commandArg != null) (
|
||||
|
|
@ -21,7 +19,7 @@ let
|
|||
);
|
||||
|
||||
commandLine = lib.concatStringsSep " " (
|
||||
[ "${package}/bin/cbatticon" ]
|
||||
[ (lib.getExe cfg.package) ]
|
||||
++ makeCommand "command-critical-level" cfg.commandCriticalLevel
|
||||
++ makeCommand "command-left-click" cfg.commandLeftClick
|
||||
++ optional (cfg.iconType != null) "--icon-type ${cfg.iconType}"
|
||||
|
|
@ -44,6 +42,8 @@ in
|
|||
services.cbatticon = {
|
||||
enable = lib.mkEnableOption "cbatticon";
|
||||
|
||||
package = lib.mkPackageOption pkgs "cbatticon" { };
|
||||
|
||||
commandCriticalLevel = mkOption {
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
|
|
@ -127,7 +127,7 @@ in
|
|||
(lib.hm.assertions.assertPlatform "services.cbatticon" pkgs lib.platforms.linux)
|
||||
];
|
||||
|
||||
home.packages = [ package ];
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
systemd.user.services.cbatticon = {
|
||||
Unit = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue