mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
redshift: don't busy-loop like crazy on NixOS start-up
This commit is contained in:
parent
fd9e991616
commit
09c8911bd7
@ -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";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user