From e7a4594300daf35f5160ee2f1fb0e6a401a34f45 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Sat, 27 Jan 2024 23:03:29 +0100 Subject: [PATCH] matrix: enable element-web --- hosts/nuc/modules/matrix/default.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hosts/nuc/modules/matrix/default.nix b/hosts/nuc/modules/matrix/default.nix index 86f4ff2..895fc8b 100644 --- a/hosts/nuc/modules/matrix/default.nix +++ b/hosts/nuc/modules/matrix/default.nix @@ -1,6 +1,12 @@ { config, pkgs, ... }: let domain = "matrix.${config.networking.domain}"; + domainClient = "chat.${config.networking.domain}"; + clientConfig = { + "m.homeserver" = { + base_url = "https://${domain}:443"; + }; + }; in { @@ -73,6 +79,23 @@ in locations."~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync)".proxyPass = "http://localhost:8009"; # locations."/_synapse/client".proxyPass = "http://[::1]:8008"; }; + + + # element + "${domainClient}" = { + enableACME = true; + forceSSL = true; + + root = pkgs.element-web.override { + conf = { + default_server_config = { + inherit (clientConfig) "m.homeserver"; + "m.identity_server".base_url = ""; + }; + disable_3pid_login = true; + }; + }; + }; }; }; };