From a62c5f34356fcbbec9b02f54ed655d06cc9634c2 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Sun, 17 Oct 2021 17:15:12 +0200 Subject: [PATCH] nixos/mailman: use separate virtualHosts --- nixos/modules/services/mail/mailman.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/mail/mailman.nix b/nixos/modules/services/mail/mailman.nix index 0c9b38b44b24..263f3b159d25 100644 --- a/nixos/modules/services/mail/mailman.nix +++ b/nixos/modules/services/mail/mailman.nix @@ -277,13 +277,12 @@ in { services.nginx = mkIf cfg.serve.enable { enable = mkDefault true; - virtualHosts."${lib.head cfg.webHosts}" = { - serverAliases = cfg.webHosts; + virtualHosts = lib.genAttrs cfg.webHosts (webHost: { locations = { "/".extraConfig = "uwsgi_pass unix:/run/mailman-web.socket;"; "/static/".alias = webSettings.STATIC_ROOT + "/"; }; - }; + }); }; environment.systemPackages = [ (pkgs.buildEnv {