Setup Sliding-Sync V3! Element X does seem to be a bit early, but still nice

This commit is contained in:
2023-10-13 00:11:52 -04:00
parent 90113aa08e
commit 275b054746
2 changed files with 21 additions and 7 deletions

12
flake.lock generated
View File

@@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1694643239,
"narHash": "sha256-pv2k/5FvyirDE8g4TNehzwZ0T4UOMMmqWSQnM/luRtE=",
"lastModified": 1696940889,
"narHash": "sha256-p2Wic74A1tZpFcld1wSEbFQQbrZ/tPDuLieCnspamQo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d9b88b43524db1591fb3d9410a21428198d75d49",
"rev": "6bba64781e4b7c1f91a733583defbd3e46b49408",
"type": "github"
},
"original": {
@@ -22,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1694767346,
"narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=",
"lastModified": 1696879762,
"narHash": "sha256-Ud6bH4DMcYHUDKavNMxAhcIpDGgHMyL/yaDEAVSImQY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ace5093e36ab1e95cb9463863491bee90d5a4183",
"rev": "f99e5f03cc0aa231ab5950a15ed02afec45ed51a",
"type": "github"
},
"original": {

View File

@@ -581,6 +581,15 @@
# port = 8888;
#};
services.matrix-synapse.sliding-sync = {
enable = true;
createDatabase = true;
environmentFile = "/var/lib/private/matrix-sliding-sync/secrets";
settings = {
SYNCV3_SERVER="https://synapse.room409.xyz";
};
};
services.matrix-synapse = {
enable = true;
@@ -708,7 +717,7 @@
locations."/.well-known/matrix/client".extraConfig = ''
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{ "m.homeserver": {"base_url": "https://synapse.room409.xyz"}, "m.identity_server": { "base_url": "https://vector.im"} }';
return 200 '{ "m.homeserver": {"base_url": "https://synapse.room409.xyz"}, "org.matrix.msc3575.proxy": { "url": "https://syncv3.room409.xyz" }, "m.identity_server": { "base_url": "https://vector.im"} }';
'';
locations."/".proxyPass = "http://localhost:8008";
locations."/".extraConfig = ''
@@ -716,6 +725,11 @@
proxy_set_header X-Forwarded-For $remote_addr;
'';
};
virtualHosts."syncv3.room409.xyz" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:8009";
};
virtualHosts."element-synapse.room409.xyz" = {
forceSSL = true;