1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

redshift/gammastep: add enableVerboseLogging option

This option controls whether the `-v` command line argument is given.

Co-authored-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
arcnmx 2022-09-09 12:25:49 -07:00 committed by Robert Helgesson
parent bd87a34bb4
commit e1f1160284
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 8 additions and 3 deletions

View file

@ -110,6 +110,8 @@ in {
''; '';
}; };
enableVerboseLogging = mkEnableOption "verbose service logging";
tray = mkOption { tray = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
@ -199,7 +201,10 @@ in {
ExecStart = let ExecStart = let
command = if cfg.tray then appletExecutable else mainExecutable; command = if cfg.tray then appletExecutable else mainExecutable;
configFullPath = config.xdg.configHome + "/${xdgConfigFilePath}"; configFullPath = config.xdg.configHome + "/${xdgConfigFilePath}";
in "${cfg.package}/bin/${command} -v -c ${configFullPath}"; in "${cfg.package}/bin/${command} " + cli.toGNUCommandLineShell { } {
v = cfg.enableVerboseLogging;
c = configFullPath;
};
RestartSec = 3; RestartSec = 3;
Restart = "on-failure"; Restart = "on-failure";
}; };

View file

@ -2,7 +2,7 @@
WantedBy=graphical-session.target WantedBy=graphical-session.target
[Service] [Service]
ExecStart=@gammastep@/bin/gammastep -v -c /home/hm-user/.config/gammastep/config.ini ExecStart=@gammastep@/bin/gammastep '-c' '/home/hm-user/.config/gammastep/config.ini'
Restart=on-failure Restart=on-failure
RestartSec=3 RestartSec=3

View file

@ -2,7 +2,7 @@
WantedBy=graphical-session.target WantedBy=graphical-session.target
[Service] [Service]
ExecStart=@redshift@/bin/redshift -v -c /home/hm-user/.config/redshift/redshift.conf ExecStart=@redshift@/bin/redshift '-c' '/home/hm-user/.config/redshift/redshift.conf'
Restart=on-failure Restart=on-failure
RestartSec=3 RestartSec=3