treewide: reformat with nixfmt 1.0.0
This commit is contained in:
@@ -168,7 +168,8 @@ let
|
|||||||
fts_header_excludes = listToLine cfg.fullTextSearch.headerExcludes;
|
fts_header_excludes = listToLine cfg.fullTextSearch.headerExcludes;
|
||||||
fts_autoindex = boolToYesNo cfg.fullTextSearch.autoIndex;
|
fts_autoindex = boolToYesNo cfg.fullTextSearch.autoIndex;
|
||||||
fts_enforced = cfg.fullTextSearch.enforced;
|
fts_enforced = cfg.fullTextSearch.enforced;
|
||||||
} // (listToMultiAttrs "fts_autoindex_exclude" cfg.fullTextSearch.autoIndexExclude);
|
}
|
||||||
|
// (listToMultiAttrs "fts_autoindex_exclude" cfg.fullTextSearch.autoIndexExclude);
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -200,7 +201,8 @@ in
|
|||||||
# which are usually not compatible.
|
# which are usually not compatible.
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.dovecot_pigeonhole
|
pkgs.dovecot_pigeonhole
|
||||||
] ++ lib.optional cfg.fullTextSearch.enable pkgs.dovecot-fts-flatcurve;
|
]
|
||||||
|
++ lib.optional cfg.fullTextSearch.enable pkgs.dovecot-fts-flatcurve;
|
||||||
|
|
||||||
# For compatibility with python imaplib
|
# For compatibility with python imaplib
|
||||||
environment.etc."dovecot/modules".source = "/run/current-system/sw/lib/dovecot/modules";
|
environment.etc."dovecot/modules".source = "/run/current-system/sw/lib/dovecot/modules";
|
||||||
@@ -228,7 +230,8 @@ in
|
|||||||
sieve = "file:${cfg.sieveDirectory}/%{user}/scripts;active=${cfg.sieveDirectory}/%{user}/active.sieve";
|
sieve = "file:${cfg.sieveDirectory}/%{user}/scripts;active=${cfg.sieveDirectory}/%{user}/active.sieve";
|
||||||
sieve_default = "file:${cfg.sieveDirectory}/%{user}/default.sieve";
|
sieve_default = "file:${cfg.sieveDirectory}/%{user}/default.sieve";
|
||||||
sieve_default_name = "default";
|
sieve_default_name = "default";
|
||||||
} // (lib.optionalAttrs cfg.fullTextSearch.enable ftsPluginSettings);
|
}
|
||||||
|
// (lib.optionalAttrs cfg.fullTextSearch.enable ftsPluginSettings);
|
||||||
|
|
||||||
sieve = {
|
sieve = {
|
||||||
extensions = [
|
extensions = [
|
||||||
@@ -448,8 +451,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.${dovecotUnitName} = {
|
systemd.services.${dovecotUnitName} = {
|
||||||
preStart =
|
preStart = ''
|
||||||
''
|
|
||||||
${genPasswdScript}
|
${genPasswdScript}
|
||||||
''
|
''
|
||||||
+ (lib.optionalString cfg.ldap.enable setPwdInLdapConfFile);
|
+ (lib.optionalString cfg.ldap.enable setPwdInLdapConfFile);
|
||||||
@@ -457,6 +459,7 @@ in
|
|||||||
|
|
||||||
systemd.services.postfix.restartTriggers = [
|
systemd.services.postfix.restartTriggers = [
|
||||||
genPasswdScript
|
genPasswdScript
|
||||||
] ++ (lib.optional cfg.ldap.enable [ setPwdInLdapConfFile ]);
|
]
|
||||||
|
++ (lib.optional cfg.ldap.enable [ setPwdInLdapConfFile ]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,9 @@ in
|
|||||||
config = lib.mkIf (cfg.enable && cfg.openFirewall) {
|
config = lib.mkIf (cfg.enable && cfg.openFirewall) {
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPorts =
|
allowedTCPPorts = [
|
||||||
[ 25 ]
|
25
|
||||||
|
]
|
||||||
++ lib.optional cfg.enableSubmission 587
|
++ lib.optional cfg.enableSubmission 587
|
||||||
++ lib.optional cfg.enableSubmissionSsl 465
|
++ lib.optional cfg.enableSubmissionSsl 465
|
||||||
++ lib.optional cfg.enableImap 143
|
++ lib.optional cfg.enableImap 143
|
||||||
|
|||||||
@@ -284,8 +284,7 @@ in
|
|||||||
virtual_gid_maps = "static:5000";
|
virtual_gid_maps = "static:5000";
|
||||||
virtual_mailbox_base = cfg.mailDirectory;
|
virtual_mailbox_base = cfg.mailDirectory;
|
||||||
virtual_mailbox_domains = vhosts_file;
|
virtual_mailbox_domains = vhosts_file;
|
||||||
virtual_mailbox_maps =
|
virtual_mailbox_maps = [
|
||||||
[
|
|
||||||
(mappedFile "valias")
|
(mappedFile "valias")
|
||||||
]
|
]
|
||||||
++ lib.optionals cfg.ldap.enable [
|
++ lib.optionals cfg.ldap.enable [
|
||||||
|
|||||||
@@ -75,8 +75,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"redis.conf" = {
|
"redis.conf" = {
|
||||||
text =
|
text = ''
|
||||||
''
|
|
||||||
servers = "${
|
servers = "${
|
||||||
if cfg.redis.port == null then
|
if cfg.redis.port == null then
|
||||||
cfg.redis.address
|
cfg.redis.address
|
||||||
|
|||||||
@@ -94,8 +94,9 @@ in
|
|||||||
# Postfix requires dovecot lmtp socket, dovecot auth socket and certificate to work
|
# Postfix requires dovecot lmtp socket, dovecot auth socket and certificate to work
|
||||||
systemd.services.postfix = {
|
systemd.services.postfix = {
|
||||||
wants = certificatesDeps;
|
wants = certificatesDeps;
|
||||||
after =
|
after = [
|
||||||
[ "${dovecotUnitName}.service" ]
|
"${dovecotUnitName}.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 = [ "${dovecotUnitName}.service" ] ++ lib.optional cfg.dkimSigning "rspamd.service";
|
||||||
|
|||||||
@@ -58,8 +58,7 @@ in
|
|||||||
|
|
||||||
virtualisation.memorySize = 1024;
|
virtualisation.memorySize = 1024;
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages = [
|
||||||
[
|
|
||||||
(pkgs.writeScriptBin "mail-check" ''
|
(pkgs.writeScriptBin "mail-check" ''
|
||||||
${pkgs.python3}/bin/python ${../scripts/mail-check.py} $@
|
${pkgs.python3}/bin/python ${../scripts/mail-check.py} $@
|
||||||
'')
|
'')
|
||||||
|
|||||||
Reference in New Issue
Block a user