Revert "Revert "Merge pull request #9543 from NixOS/staging.post-15.06""

This reverts commit 741bf840da.

This reverts the fallout from reverting the major changes.
This commit is contained in:
William A. Kennington III
2015-11-14 12:32:51 -08:00
parent e4feccce81
commit 6602f49495
42 changed files with 579 additions and 140 deletions
+19 -1
View File
@@ -46,6 +46,17 @@ in {
is left empty, the OpenSMTPD server will not start.
'';
};
procPackages = mkOption {
type = types.listOf types.path;
default = [];
description = ''
Packages to search for filters, tables, queues, and schedulers.
Add OpenSMTPD-extras here if you want to use the filters, etc. from
that package.
'';
};
};
};
@@ -72,12 +83,19 @@ in {
};
};
systemd.services.opensmtpd = {
systemd.services.opensmtpd = let
procEnv = pkgs.buildEnv {
name = "opensmtpd-procs";
paths = [ opensmtpd ] ++ cfg.procPackages;
pathsToLink = [ "/libexec/opensmtpd" ];
};
in {
wantedBy = [ "multi-user.target" ];
wants = [ "network.target" ];
after = [ "network.target" ];
preStart = "mkdir -p /var/spool";
serviceConfig.ExecStart = "${opensmtpd}/sbin/smtpd -d -f ${conf} ${args}";
environment.OPENSMTPD_PROC_PATH = "${procEnv}/libexec/opensmtpd";
};
environment.systemPackages = [ (pkgs.runCommand "opensmtpd-sendmail" {} ''