Requiring nixpkgs 24196, I made nixos set the sendmail path to vixie cron, so
now vixie cron can send mail properly, for example if a user enabled the 'postfix' service. svn path=/nixos/trunk/; revision=24197
This commit is contained in:
parent
a069fcffc6
commit
70a2ad7898
1 changed files with 9 additions and 2 deletions
|
@ -16,6 +16,13 @@ let
|
|||
${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)}
|
||||
'';
|
||||
|
||||
# Vixie cron requires build-time configuration for the sendmail path.
|
||||
cronNixosPkg = pkgs.cron.override {
|
||||
# The mail.nix nixos module, if there is any local mail system enabled,
|
||||
# should have sendmail in this path.
|
||||
sendmailPath = "/var/setuid-wrappers/sendmail";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -65,7 +72,7 @@ in
|
|||
mode = "0600"; # Cron requires this.
|
||||
};
|
||||
|
||||
environment.systemPackages = [pkgs.cron];
|
||||
environment.systemPackages = [ cronNixosPkg ];
|
||||
|
||||
jobs.cron =
|
||||
{ description = "Cron daemon";
|
||||
|
@ -86,7 +93,7 @@ in
|
|||
fi
|
||||
'';
|
||||
|
||||
exec = "${pkgs.cron}/sbin/cron -n";
|
||||
exec = "${cronNixosPkg}/sbin/cron -n";
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue