From fded4d98cdd8fb92e17aa20c43b622d3a42ef75d Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Sun, 4 Jun 2023 15:06:15 -0400 Subject: [PATCH] oops --- machines/pendulum/matrix.nix | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/machines/pendulum/matrix.nix b/machines/pendulum/matrix.nix index a3b67f2..05e10aa 100644 --- a/machines/pendulum/matrix.nix +++ b/machines/pendulum/matrix.nix @@ -70,7 +70,7 @@ hostName + lib.optionalString (domain != null) ".${domain}"; in join config.networking.hostName config.networking.domain; in { - "matrix.community.rs" = { + "community.rs" = { enableACME = true; forceSSL = true; @@ -122,29 +122,5 @@ ''; root = "/var/www"; }; - "community.rs" = { - enableACME = true; - forceSSL = true; - locations."= /.well-known/matrix/server".extraConfig = let - # use 443 instead of the default 8448 port to unite - # the client-server and server-server port for simplicity - server = { "m.server" = "${fqdn}:443"; }; - in '' - add_header Content-Type application/json; - return 200 '${builtins.toJSON server}'; - ''; - locations."= /.well-known/matrix/client".extraConfig = let - client = { - "m.homeserver" = { "base_url" = "https://${fqdn}"; }; - "m.identity_server" = { "base_url" = "https://vector.im"; }; - }; - # ACAO required to allow element-web on any URL to request this json file - in '' - add_header Content-Type application/json; - add_header Access-Control-Allow-Origin *; - return 200 '${builtins.toJSON client}'; - ''; - root = "/var/www"; - }; }; }