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`.
This commit is contained in:
Maximilian Bosch 2023-01-04 11:58:41 +01:00
parent eb44dbc1e6
commit 05f6dd4dc6
No known key found for this signature in database
GPG Key ID: 9A6EEA275CA5BE0A

View File

@ -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"];