nixos: services: matrix: simplify VHost

This commit is contained in:
Bruno BELANYI 2025-08-03 10:42:23 +02:00
parent bd019258cb
commit 1e31b2dfea

View file

@ -134,18 +134,11 @@ in
}; };
}; };
}; };
# Dummy VHosts for port collision detection matrix = {
matrix-dummy = { # Somewhat unused, but necessary for port collision detection
inherit (cfg) port; inherit (cfg) port;
};
};
# Those are too complicated to use my wrapper...
services.nginx.virtualHosts = {
${matrixDomain} = {
onlySSL = true;
useACMEHost = domain;
extraConfig = {
locations = { locations = {
# Or do a redirect instead of the 404, or whatever is appropriate # Or do a redirect instead of the 404, or whatever is appropriate
# for you. But do not put a Matrix Web client here! See the # for you. But do not put a Matrix Web client here! See the
@ -156,7 +149,11 @@ in
"/_synapse/client".proxyPass = "http://[::1]:${toString cfg.port}"; "/_synapse/client".proxyPass = "http://[::1]:${toString cfg.port}";
}; };
}; };
};
};
# Those are too complicated to use my wrapper...
services.nginx.virtualHosts = {
"${domain}" = { "${domain}" = {
forceSSL = true; forceSSL = true;
useACMEHost = domain; useACMEHost = domain;