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:
Lluís Batlle i Rossell 2010-10-10 11:08:10 +00:00
parent a069fcffc6
commit 70a2ad7898

View file

@ -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";
};
};