From c0aeed8ea49bf67e85e4ecbc871ebbee9060f937 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Thu, 22 May 2025 18:08:22 +0200 Subject: [PATCH] stalwart: fix domain issues --- modules/services/stalwart/module.nix | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/modules/services/stalwart/module.nix b/modules/services/stalwart/module.nix index ad28e3c..d3e384a 100644 --- a/modules/services/stalwart/module.nix +++ b/modules/services/stalwart/module.nix @@ -7,8 +7,8 @@ inherit (lib.modules) mkIf; inherit (lib.options) mkEnableOption; - domain = "charlieroot.dev"; - acmeRoot = "/var/lib/acme/challenges-stalwart"; + domain = "mail.charlieroot.dev"; + cfg = config.modules.system.services.stalwart; in { options.modules.system.services.stalwart.enable = mkEnableOption "stalwart"; @@ -27,7 +27,7 @@ in { server = { # The default server hostname is utilized in SMTP EHLO commands, # as well as included in message headers and reports. - hostname = "mail.${domain}"; + hostname = domain; tls = { # Specifies whether the TLS encryption is available for the listener. enable = true; @@ -66,7 +66,7 @@ in { }; jmap = { bind = ["localhost::8080" "[::]:8080"]; - url = "https://mail.${domain}"; + url = "https://${domain}"; protocol = "jmap"; tls.implicit = true; }; @@ -77,7 +77,7 @@ in { }; }; lookup.default = { - hostname = "mail.${domain}"; + hostname = domain; inherit domain; }; }; @@ -130,19 +130,5 @@ in { }; }; }; - security.acme = let - email = "charlie@charlieroot.dev"; - in { - # testing server, do not use in production, but DO use it for setting things up. - # it has much higher rate limits. - # defaults.server = "https://acme-staging-v02.api.letsencrypt.org/directory"; - certs = { - "mail.${domain}" = { - webroot = acmeRoot; - inherit email; - group = "nginx"; - }; - }; - }; }; }