Add Element web to Matrix deploy

This commit is contained in:
Greg Hellings
2022-04-12 15:45:08 +00:00
parent 56a6d00ff5
commit c7970c6198
+16 -1
View File
@@ -2,7 +2,7 @@
# them by the following commands:
# nix run nixpkgs.matrix-synapse
# register_new_matrix_user -k "B9EoPr2WV9hzwc7uL2Sx1JmvCeKDEOGCpB0uginQcQtEH4wzRtkSIdo7lltrjSQa" http://localhost:8448
{ config, ... }:
{ config, pkgs, ... }:
let
domain = "${config.networking.domain}";
fqdn = "matrix.${domain}";
@@ -50,6 +50,21 @@ return 200 '${builtins.toJSON client}';
proxyPass = "http://127.0.0.1:8448"; # Lacking the trailing / is correct
};
};
# Run Element web
"chat.${fqdn}" = {
enableACME = true;
forceSSL = true;
serverAliases = [
"chat.${domain}"
];
root = pkgs.element-web.override {
conf.default_server_config."m.homeserver" = {
"base_url" = "https://${fqdn}";
"server_name" = "${fqdn}";
};
};
};
};
};