Remove dovecot service name compat code
This commit is contained in:
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
options,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
}:
|
}:
|
||||||
@@ -87,6 +86,4 @@ in
|
|||||||
chmod 600 ${destination}
|
chmod 600 ${destination}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dovecotUnitName = if options.services.dovecot2 ? hasNewUnitName then "dovecot" else "dovecot2";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -450,7 +450,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.${dovecotUnitName} = {
|
systemd.services.dovecot = {
|
||||||
preStart = ''
|
preStart = ''
|
||||||
${genPasswdScript}
|
${genPasswdScript}
|
||||||
''
|
''
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ in
|
|||||||
extraDomainNames = lib.mkIf (cfg.certificateScheme == "acme") cfg.certificateDomains;
|
extraDomainNames = lib.mkIf (cfg.certificateScheme == "acme") cfg.certificateDomains;
|
||||||
reloadServices = [
|
reloadServices = [
|
||||||
"postfix.service"
|
"postfix.service"
|
||||||
"${dovecotUnitName}.service"
|
"dovecot.service"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Create maildir folder before dovecot startup
|
# Create maildir folder before dovecot startup
|
||||||
systemd.services.${dovecotUnitName} = {
|
systemd.services.dovecot = {
|
||||||
wants = certificatesDeps;
|
wants = certificatesDeps;
|
||||||
after = certificatesDeps;
|
after = certificatesDeps;
|
||||||
preStart =
|
preStart =
|
||||||
@@ -95,11 +95,11 @@ in
|
|||||||
systemd.services.postfix = {
|
systemd.services.postfix = {
|
||||||
wants = certificatesDeps;
|
wants = certificatesDeps;
|
||||||
after = [
|
after = [
|
||||||
"${dovecotUnitName}.service"
|
"dovecot.service"
|
||||||
]
|
]
|
||||||
++ lib.optional cfg.dkimSigning "rspamd.service"
|
++ lib.optional cfg.dkimSigning "rspamd.service"
|
||||||
++ certificatesDeps;
|
++ certificatesDeps;
|
||||||
requires = [ "${dovecotUnitName}.service" ] ++ lib.optional cfg.dkimSigning "rspamd.service";
|
requires = [ "dovecot.service" ] ++ lib.optional cfg.dkimSigning "rspamd.service";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ in
|
|||||||
|
|
||||||
systemd.services.activate-virtual-mail-users = {
|
systemd.services.activate-virtual-mail-users = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
before = [ "${dovecotUnitName}.service" ];
|
before = [ "dovecot.service" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = virtualMailUsersActivationScript;
|
ExecStart = virtualMailUsersActivationScript;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user