about summary refs log tree commit diff stats
path: root/modules/by-name/st/stalwart-mail/module.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-23 12:25:07 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-23 12:25:07 +0200
commited901a996db4296e55953b6f91ed097f234c8eb2 (patch)
tree99631d260b41a4ddbe5ab3d5d4516e00bbf3718f /modules/by-name/st/stalwart-mail/module.nix
parentmodules/constants: Also add a user to each group, so that duplicated gids are... (diff)
downloadnixos-server-ed901a996db4296e55953b6f91ed097f234c8eb2.zip
modules/stalwart-mail: Add recommended proxy settings for stalwarts-proxy
This includes setting things, like setting the `X-Forwarded-For` header.
Diffstat (limited to '')
-rw-r--r--modules/by-name/st/stalwart-mail/module.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/by-name/st/stalwart-mail/module.nix b/modules/by-name/st/stalwart-mail/module.nix
index cc4acc9..7bd985f 100644
--- a/modules/by-name/st/stalwart-mail/module.nix
+++ b/modules/by-name/st/stalwart-mail/module.nix
@@ -188,7 +188,11 @@ in {
       };
 
       nginx.virtualHosts."${cfg.fqdn}" = {
-        locations."/".proxyPass = "http://${builtins.elemAt config.services.stalwart-mail.settings.server.listener.http.bind 0}";
+        locations."/" = {
+          proxyPass = "http://${builtins.elemAt config.services.stalwart-mail.settings.server.listener.http.bind 0}";
+          recommendedProxySettings = true;
+        };
+
         useACMEHost = "${cfg.fqdn}";
         forceSSL = true;
       };