redshift: don't busy-loop like crazy on NixOS start-up

This commit is contained in:
Tobias Geerinckx-Rice 2015-12-21 03:13:18 +01:00
parent fd9e991616
commit 09c8911bd7

View File

@ -98,13 +98,16 @@ in {
requires = [ "display-manager.service" ];
after = [ "display-manager.service" ];
wantedBy = [ "graphical.target" ];
serviceConfig.ExecStart = ''
${cfg.package}/bin/redshift \
-l ${cfg.latitude}:${cfg.longitude} \
-t ${toString cfg.temperature.day}:${toString cfg.temperature.night} \
-b ${toString cfg.brightness.day}:${toString cfg.brightness.night} \
${lib.strings.concatStringsSep " " cfg.extraOptions}
'';
serviceConfig = {
ExecStart = ''
${cfg.package}/bin/redshift \
-l ${cfg.latitude}:${cfg.longitude} \
-t ${toString cfg.temperature.day}:${toString cfg.temperature.night} \
-b ${toString cfg.brightness.day}:${toString cfg.brightness.night} \
${lib.strings.concatStringsSep " " cfg.extraOptions}
'';
RestartSec = 3;
};
environment = { DISPLAY = ":0"; };
serviceConfig.Restart = "always";
};