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

@ -15,6 +15,13 @@ let
NIX_CONF_DIR=/nix/etc/nix NIX_CONF_DIR=/nix/etc/nix
${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)} ${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 in
@ -65,7 +72,7 @@ in
mode = "0600"; # Cron requires this. mode = "0600"; # Cron requires this.
}; };
environment.systemPackages = [pkgs.cron]; environment.systemPackages = [ cronNixosPkg ];
jobs.cron = jobs.cron =
{ description = "Cron daemon"; { description = "Cron daemon";
@ -86,7 +93,7 @@ in
fi fi
''; '';
exec = "${pkgs.cron}/sbin/cron -n"; exec = "${cronNixosPkg}/sbin/cron -n";
}; };
}; };