mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
cron: make into systemd.service and make it depend on /etc/localtime
so that changes in timezone will trigger a restart of cron service.
This commit is contained in:
parent
5819f29875
commit
b48e41b8d7
@ -97,12 +97,10 @@ in
|
||||
|
||||
environment.systemPackages = [ cronNixosPkg ];
|
||||
|
||||
jobs.cron =
|
||||
systemd.services.cron =
|
||||
{ description = "Cron Daemon";
|
||||
|
||||
startOn = "startup";
|
||||
|
||||
path = [ cronNixosPkg ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
preStart =
|
||||
''
|
||||
@ -119,7 +117,8 @@ in
|
||||
fi
|
||||
'';
|
||||
|
||||
exec = "cron -n";
|
||||
restartTriggers = [ config.environment.etc.localtime.source ];
|
||||
serviceConfig.ExecStart = "${cronNixosPkg}/bin/cron -n";
|
||||
};
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user