Skip to content

Commit

Permalink
redshift/gammastep: add enableVerboseLogging option
Browse files Browse the repository at this point in the history
This option controls whether the `-v` command line argument is given.

Co-authored-by: Sumner Evans <[email protected]>
  • Loading branch information
2 people authored and rycee committed Oct 8, 2022
1 parent bd87a34 commit e1f1160
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion modules/services/redshift-gammastep/lib/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ in {
'';
};

enableVerboseLogging = mkEnableOption "verbose service logging";

tray = mkOption {
type = types.bool;
default = false;
Expand Down Expand Up @@ -199,7 +201,10 @@ in {
ExecStart = let
command = if cfg.tray then appletExecutable else mainExecutable;
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;
Restart = "on-failure";
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
WantedBy=graphical-session.target

[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
RestartSec=3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
WantedBy=graphical-session.target

[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
RestartSec=3

Expand Down

0 comments on commit e1f1160

Please sign in to comment.