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
@ -15,6 +15,13 @@ let
|
||||
NIX_CONF_DIR=/nix/etc/nix
|
||||
${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 New Issue
Block a user