From b2bd89105d18e5120cf840c1776370a73c48a2df Mon Sep 17 00:00:00 2001 From: Emelie Graven Date: Fri, 13 Oct 2023 13:32:53 +0200 Subject: [PATCH] feat: Add sliding sync proxy --- config/hosts/wind/services/nginx.nix | 5 +++-- config/hosts/wind/services/synapse.nix | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/hosts/wind/services/nginx.nix b/config/hosts/wind/services/nginx.nix index f9253bb..875a586 100644 --- a/config/hosts/wind/services/nginx.nix +++ b/config/hosts/wind/services/nginx.nix @@ -5,8 +5,9 @@ enableACME = true; forceSSL = true; locations."/".root = "/var/www/graven.dev/public"; - locations."/_matrix".proxyPass = "http://127.0.0.1:8008"; - locations."/_synapse".proxyPass = "http://127.0.0.1:8008"; + locations."~ ^(\\/_matrix|\\/_synapse\\/client)".proxyPass = "http://127.0.0.1:8008"; + locations."~ ^(\\/_matrix|\\/_synapse\\/client)".proxyPass = "http://127.0.0.1:8008"; + locations."~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync)".proxyPass = "http://127.0.0.1:8009"; locations."/.well-known/matrix/" = { root = "/var/www/matrix/public"; extraConfig = '' diff --git a/config/hosts/wind/services/synapse.nix b/config/hosts/wind/services/synapse.nix index c5899eb..8e236e2 100644 --- a/config/hosts/wind/services/synapse.nix +++ b/config/hosts/wind/services/synapse.nix @@ -5,6 +5,10 @@ enable = true; withJemalloc = true; extraConfigFiles = [ config.secrets.files.synapse_extra_config.file ]; + sliding-sync = { + enable = true; + settings.SYNCV3_SERVER = "https://graven.dev"; + }; settings = { server_name = "graven.dev"; enable_registration = false;