mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2025-01-23 17:26:44 +00:00
fix: from review
This commit is contained in:
parent
f9a949b5b5
commit
99d404bd10
|
@ -1,15 +1,5 @@
|
||||||
[
|
[
|
||||||
[
|
["selfprivacy", "domain"],
|
||||||
"selfprivacy",
|
["selfprivacy", "modules", "roundcube"],
|
||||||
"domain"
|
["mailserver", "fqdn"]
|
||||||
],
|
]
|
||||||
[
|
|
||||||
"selfprivacy",
|
|
||||||
"modules",
|
|
||||||
"roundcube"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"mailserver",
|
|
||||||
"fqdn"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
|
@ -17,19 +17,24 @@ in
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
services.roundcube = {
|
services.roundcube = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# this is the url of the vhost, not necessarily the same as the fqdn of
|
# this is the url of the vhost, not necessarily the same as the fqdn of
|
||||||
# the mailserver
|
# the mailserver
|
||||||
hostName = "${cfg.subdomain}.${config.selfprivacy.domain}";
|
hostName = "${cfg.subdomain}.${config.selfprivacy.domain}";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
# starttls needed for authentication, so the fqdn required to match
|
# starttls needed for authentication, so the fqdn required to match
|
||||||
# the certificate
|
# the certificate
|
||||||
$config['smtp_server'] = "tls://${config.mailserver.fqdn}";
|
$config['smtp_server'] = "tls://${config.mailserver.fqdn}";
|
||||||
$config['smtp_user'] = "%u";
|
$config['smtp_user'] = "%u";
|
||||||
$config['smtp_pass'] = "%p";
|
$config['smtp_pass'] = "%p";
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
services.nginx.virtualHosts."${cfg.subdomain}.${domain}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = domain;
|
||||||
|
enableACME = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue