nixos/exim: allow using service credentials
By settings User= to the actual Exim user, systemd will ensure that the credentials directory will have the correct ownership, allowing users to utilize LoadCredential=. Exim still gets started as root (and drops privileges) to preserve the previous behavior.
This commit is contained in:
parent
074623d912
commit
816614bd62
1 changed files with 3 additions and 2 deletions
|
@ -116,8 +116,9 @@ in
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
restartTriggers = [ config.environment.etc."exim.conf".source ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package}/bin/exim -bdf -q${cfg.queueRunnerInterval}";
|
||||
ExecReload = "${coreutils}/bin/kill -HUP $MAINPID";
|
||||
ExecStart = "+${cfg.package}/bin/exim -bdf -q${cfg.queueRunnerInterval}";
|
||||
ExecReload = "+${coreutils}/bin/kill -HUP $MAINPID";
|
||||
User = cfg.user;
|
||||
};
|
||||
preStart = ''
|
||||
if ! test -d ${cfg.spoolDir}; then
|
||||
|
|
Loading…
Reference in a new issue