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; + }; + }; + }; }; }; };