From 84fff7a6f22c27bb122bc72698144643a1fd25c1 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 29 Jan 2021 14:32:43 +0100 Subject: [PATCH] matrix: add hosted Element web setup --- services/matrix.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/services/matrix.nix b/services/matrix.nix index 59ddac3..5d72cf2 100644 --- a/services/matrix.nix +++ b/services/matrix.nix @@ -126,6 +126,36 @@ in { return 200 '${builtins.toJSON client}'; ''; }; + + # Element Web app deployment + # + "chat.${domain}" = { + enableACME = true; + forceSSL = true; + + root = pkgs.element-web.override { + conf = { + default_server_config = { + "m.homeserver" = { + "base_url" = "https://matrix.${domain}"; + "server_name" = "${domain}"; + }; + "m.identity_server" = { + "base_url" = "https://vector.im"; + }; + }; + showLabsSettings = true; + defaultCountryCode = "FR"; # cocorico + roomDirectory = { + "servers" = [ + "matrix.org" + "mozilla.org" + "prologin.org" + ]; + }; + }; + }; + }; }; };