From c88a0608f64937d429fb8ddd232a7e8d172c627c Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 18 Nov 2023 17:34:33 +0100 Subject: [PATCH] fix: matrix delegation via well-known for test domain We use pub.solar as our server_name and matrix.pub.solar:8448 for matrix federation traffic. The well-known record served at https://pub.solar/.well-known/matrix/server should point to matrix.pub.solar:8448. The same is true for test.pub.solar and matrix.test.pub.solar:8448. https://matrix-org.github.io/synapse/latest/delegate.html --- hosts/nachtigall/apps/nginx-matrix.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hosts/nachtigall/apps/nginx-matrix.nix b/hosts/nachtigall/apps/nginx-matrix.nix index eaee4155..d110248b 100644 --- a/hosts/nachtigall/apps/nginx-matrix.nix +++ b/hosts/nachtigall/apps/nginx-matrix.nix @@ -25,7 +25,7 @@ let ]; }; }; - wellKnownServer = domain: { "m.server" = "${domain}:8448"; }; + wellKnownServer = domain: { "m.server" = "matrix.${domain}:8448"; }; mkWellKnown = data: '' add_header Content-Type application/json; add_header Access-Control-Allow-Origin *; @@ -50,6 +50,14 @@ in ####################################### # Stuff below is still in betatesting # ####################################### + "test.pub.solar" = { + root = "/dev/null"; + + forceSSL = lib.mkDefault true; + enableACME = lib.mkDefault true; + + locations = (wellKnownLocations "test.pub.solar"); + }; "chat.test.pub.solar" = { forceSSL = true; @@ -70,7 +78,7 @@ in gzip on; gzip_types text/plain application/json; ''; - locations = (wellKnownLocations "test.pub.solar") // { + locations = { # TODO: Configure metrics # "/metrics" = { # };