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.

tv 816614bd 074623d9

Changed files
+3 -2
nixos
modules
services
mail
+3 -2
nixos/modules/services/mail/exim.nix
···
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";
};
preStart = ''
if ! test -d ${cfg.spoolDir}; then
···
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";
+
User = cfg.user;
};
preStart = ''
if ! test -d ${cfg.spoolDir}; then