omniflake/system/mail-server/roundcube.nix
2026-02-27 21:41:24 +01:00

36 lines
770 B
Nix

{ config, ... }:
let
webmailHostName = "webmail.${config.networking.domain}";
in
{
services.roundcube = {
enable = true;
hostName = webmailHostName;
extraConfig = ''
$config['smtp_host'] = 'tls://%h';
$config['smtp_conn_options'] = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
],
];
'';
};
# not sure why this is currently working w/o the following
#
# services.nginx.virtualHosts."${webmailHostName}" = {
# onlySSL = true;
# forceSSL = lib.mkForce false;
# enableACME = lib.mkForce false;
# useACMEHost = config.networking.domain;
# };
# security.acme.certs."${config.networking.domain}".extraDomainNames = [
# webmailHostName
# ];
}