From 05f6dd4dc685ed874c20195792907ecf71d5ef00 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 4 Jan 2023 11:58:41 +0100 Subject: nixos/mailman: fix hyperkitty css/js when virtualRoot is `/` The `manage-script-name` / `mount` approach doesn't work if you don't serve your instance behind e.g. `/lists`. --- nixos/modules/services/mail/mailman.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'nixos/modules/services/mail/mailman.nix') diff --git a/nixos/modules/services/mail/mailman.nix b/nixos/modules/services/mail/mailman.nix index 0ca87696b14..2adc7427abf 100644 --- a/nixos/modules/services/mail/mailman.nix +++ b/nixos/modules/services/mail/mailman.nix @@ -570,10 +570,14 @@ in { type = "normal"; plugins = ["python3"]; home = webEnv; - manage-script-name = true; - mount = "${cfg.serve.virtualRoot}=mailman_web.wsgi:application"; http = "127.0.0.1:18507"; - }; + } + // (if cfg.serve.virtualRoot == "/" + then { module = "mailman_web.wsgi:application"; } + else { + mount = "${cfg.serve.virtualRoot}=mailman_web.wsgi:application"; + manage-script-name = true; + }); uwsgiConfigFile = pkgs.writeText "uwsgi-mailman.json" (builtins.toJSON uwsgiConfig); in { wantedBy = ["multi-user.target"]; -- cgit 1.4.1