From 27d21a548db057b7f7b60024abcd0a6ff3b05e23 Mon Sep 17 00:00:00 2001 From: coolneng Date: Sun, 23 Oct 2022 10:54:47 +0200 Subject: [PATCH] Update well-known delegation settings for Matrix --- modules/webstack.nix | 11 ++++++----- well-known/matrix/client | 3 --- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/webstack.nix b/modules/webstack.nix index 08cf8de..5df718f 100644 --- a/modules/webstack.nix +++ b/modules/webstack.nix @@ -40,12 +40,13 @@ "rewrite ^/gitea/(.*)$ https://git.coolneng.duckdns.org/$1 last;"; "/miniflux/".extraConfig = "rewrite ^/miniflux/(.*)$ https://rss.coolneng.duckdns.org/$1 last;"; + # Delegation for Matrix "/.well-known/" = { alias = "${../well-known}" + "/"; extraConfig = '' ${config.services.nginx.commonHttpConfig} - add_header Access-Control-Allow-Origin '*'; - add_header Content-Type application/json; + default_type application/json; + add_header Access-Control-Allow-Origin * always; ''; }; }; @@ -110,9 +111,9 @@ enableACME = true; forceSSL = true; locations."/".root = pkgs.element-web.override { - conf.default_server_config."m.homeserver" = { - "base_url" = "https://matrix.coolneng.duckdns.org"; - "server_name" = "coolneng.duckdns.org"; + conf.default_server_config = { + "m.homeserver"."base_url" = "https://matrix.coolneng.duckdns.org"; + "m.identity_server"."base_url" = "https://vector.im"; }; }; }; diff --git a/well-known/matrix/client b/well-known/matrix/client index 061cda1..50aedbb 100644 --- a/well-known/matrix/client +++ b/well-known/matrix/client @@ -1,8 +1,5 @@ { "m.homeserver": { "base_url": "https://matrix.coolneng.duckdns.org" - }, - "m.identity_server": { - "base_url": "https://vector.im" } }