forked from mirrors/nixpkgs
nixos/dovecot: symlink system-wide config and use it
This commit is contained in:
parent
70e77f9b53
commit
39bbac96af
1 changed files with 4 additions and 2 deletions
|
@ -201,6 +201,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc."dovecot/modules".source = modulesDir;
|
environment.etc."dovecot/modules".source = modulesDir;
|
||||||
|
environment.etc."dovecot/dovecot.conf".source = cfg.configFile;
|
||||||
|
|
||||||
systemd.services.dovecot2 = {
|
systemd.services.dovecot2 = {
|
||||||
description = "Dovecot IMAP/POP3 server";
|
description = "Dovecot IMAP/POP3 server";
|
||||||
|
@ -208,10 +209,11 @@ in
|
||||||
after = [ "keys.target" "network.target" ];
|
after = [ "keys.target" "network.target" ];
|
||||||
wants = [ "keys.target" ];
|
wants = [ "keys.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
restartTriggers = [ cfg.configFile ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${dovecotPkg}/sbin/dovecot -F -c ${cfg.configFile}";
|
ExecStart = "${dovecotPkg}/sbin/dovecot -F";
|
||||||
ExecReload = "${dovecotPkg}/sbin/doveadm reload -c ${cfg.configFile}";
|
ExecReload = "${dovecotPkg}/sbin/doveadm reload";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = "1s";
|
RestartSec = "1s";
|
||||||
StartLimitInterval = "1min";
|
StartLimitInterval = "1min";
|
||||||
|
|
Loading…
Add table
Reference in a new issue