server: fix matrix stuff

This commit is contained in:
chayleaf 2024-09-13 23:01:22 +07:00
parent bd0f0b2720
commit 5d7d19eeb1
Signed by: chayleaf
GPG key ID: 78171AD46227E68E
2 changed files with 3 additions and 2 deletions

View file

@ -42,7 +42,7 @@ in {
locations = {
"= /.well-known/matrix/server".extraConfig = matrixServerConfigResponse;
"= /.well-known/matrix/client".extraConfig = matrixClientConfigResponse;
"~ ^/(_matrix|_synapse/client|$)".proxyPass = "http://${lib.quoteListenAddr matrixAddr}:${toString matrixPort}";
"~ ^/(_matrix(?!/maubot)|_synapse/client|$)".proxyPass = "http://${lib.quoteListenAddr matrixAddr}:${toString matrixPort}";
"~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/)".proxyPass = "http://${config.services.matrix-sliding-sync.settings.SYNCV3_BINDADDR}";
};
};
@ -78,6 +78,7 @@ in {
services.matrix-synapse = {
enable = true;
extraConfigFiles = [ "/var/lib/matrix-synapse/config.yaml" ];
log.root.level = "WARNING";
settings = {
app_service_config_files = [
"/var/lib/heisenbridge/registration.yml"

View file

@ -9,7 +9,7 @@ in {
services.nginx.virtualHosts."matrix.${cfg.domainName}".locations = let
inherit (config.services.maubot) settings;
in {
"/_matrix/maubot/" = {
"^~ /_matrix/maubot/" = {
proxyPass = "http://${lib.quoteListenAddr settings.server.hostname}:${toString settings.server.port}";
proxyWebsockets = true;
};