diff options
author | Nadrieril <nadrieril@gmail.com> | 2018-01-10 20:31:28 +0000 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2018-01-22 19:09:13 +0100 |
commit | 38020d9068695272e2541ff4fd46c9c85f7ea91e (patch) | |
tree | f0765d019d1d1d53b16a889187b45594530eb4d7 | |
parent | 1b0a5eb54a9b41ca52e26c5d23197ade7cdb63b3 (diff) |
redshift: add option to start redshift tray applet
-rw-r--r-- | modules/services/redshift.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/services/redshift.nix b/modules/services/redshift.nix index 9bf66f8946f..423b9fe1b40 100644 --- a/modules/services/redshift.nix +++ b/modules/services/redshift.nix @@ -87,6 +87,15 @@ in ''; }; + tray = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + Start the redshift-gtk tray applet. + ''; + }; + extraOptions = mkOption { type = types.listOf types.str; default = []; @@ -118,8 +127,9 @@ in "-t ${toString cfg.temperature.day}:${toString cfg.temperature.night}" "-b ${toString cfg.brightness.day}:${toString cfg.brightness.night}" ] ++ cfg.extraOptions; + command = if cfg.tray then "redshift-gtk" else "redshift"; in - "${cfg.package}/bin/redshift ${concatStringsSep " " args}"; + "${cfg.package}/bin/${command} ${concatStringsSep " " args}"; RestartSec = 3; Restart = "always"; }; |