nixos/mailman: use separate virtualHosts

This commit is contained in:
Wei Tang 2021-10-17 17:15:12 +02:00 committed by GitHub
parent 96a9926645
commit a62c5f3435
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {