From 6fa03994b1790da2e96148d249538a279b71eed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Tue, 7 Nov 2023 15:11:40 +0100 Subject: [PATCH 1/2] fix: add matrix well-known for pub.solar --- hosts/nachtigall/apps/nginx-matrix.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/hosts/nachtigall/apps/nginx-matrix.nix b/hosts/nachtigall/apps/nginx-matrix.nix index 13dc2730..50b0bf18 100644 --- a/hosts/nachtigall/apps/nginx-matrix.nix +++ b/hosts/nachtigall/apps/nginx-matrix.nix @@ -6,8 +6,8 @@ let add_header X-XSS-Protection "1; mode=block"; ''; clientConfig = import ./matrix/element-client-config.nix; - wellKnownClient."m.homeserver".base_url = "https://matrix.test.pub.solar"; - wellKnownServer."m.server" = "matrix.test.pub.solar:8448"; + wellKnownClient."m.homeserver".base_url = "https://matrix.pub.solar"; + wellKnownServer."m.server" = "matrix.pub.solar:8448"; mkWellKnown = data: '' add_header Content-Type application/json; add_header Access-Control-Allow-Origin *; @@ -20,12 +20,7 @@ let in { services.nginx.virtualHosts = { - "test.pub.solar" = { - root = "/dev/null"; - - forceSSL = lib.mkDefault true; - enableACME = lib.mkDefault true; - + "pub.solar" = { locations = wellKnownLocations; }; From b085c2e2b289e445e0d86d8be2ac952b1937c630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Tue, 7 Nov 2023 15:19:55 +0100 Subject: [PATCH 2/2] feat: add all matrix well-known data to nginx --- hosts/nachtigall/apps/nginx-matrix.nix | 28 +++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/hosts/nachtigall/apps/nginx-matrix.nix b/hosts/nachtigall/apps/nginx-matrix.nix index 50b0bf18..cc6ea018 100644 --- a/hosts/nachtigall/apps/nginx-matrix.nix +++ b/hosts/nachtigall/apps/nginx-matrix.nix @@ -6,7 +6,24 @@ let add_header X-XSS-Protection "1; mode=block"; ''; clientConfig = import ./matrix/element-client-config.nix; - wellKnownClient."m.homeserver".base_url = "https://matrix.pub.solar"; + wellKnownClient = { + "m.homeserver".base_url = "https://matrix.pub.solar"; + "m.identity_server".base_url = "https://matrix.pub.solar"; + "im.vector.riot.e2ee".default = true; + "io.element.e2ee" = { + default = true; + secure_backup_required = false; + secure_backup_setup_methods = []; + }; + "m.integrations" = { + managers = [ + { + api_url = "https://dimension.pub.solar/api/v1/scalar"; + ui_url = "https://dimension.pub.solar/element"; + } + ]; + }; + }; wellKnownServer."m.server" = "matrix.pub.solar:8448"; mkWellKnown = data: '' add_header Content-Type application/json; @@ -20,10 +37,19 @@ let in { services.nginx.virtualHosts = { + + ##################################### + # This is already in production use # + ##################################### + "pub.solar" = { locations = wellKnownLocations; }; + ####################################### + # Stuff below is still in betatesting # + ####################################### + "chat.test.pub.solar" = { forceSSL = true; enableACME = true;