nixos-config/services/matrix/element.nix

37 lines
1.1 KiB
Nix
Raw Normal View History

2023-01-08 15:49:53 +01:00
{ config, pkgs, ... }:
let
inherit (config.services.dendrite.settings.global) server_name;
matrix_host = "matrix.${server_name}";
2023-01-08 15:49:53 +01:00
in {
services.nginx.virtualHosts."element.felschr.com" = {
forceSSL = true;
enableACME = true;
root = pkgs.element-web.override {
conf = {
default_server_config."m.homeserver" = {
base_url = "https://${matrix_host}";
server_name = "${server_name}";
2023-01-08 15:49:53 +01:00
};
disable_guests = true;
features = {
feature_pinning = true;
feature_thread = true;
feature_video_rooms = true;
feature_group_calls = true;
};
2023-01-08 15:49:53 +01:00
show_labs_settings = true;
roomDirectory.servers =
[ server_name "matrix.org" "gitter.im" "libera.chat" ];
enable_presence_by_hs_url = {
"https://${matrix_host}" = false;
"https://matrix.org" = false;
"https://matrix-client.matrix.org" = false;
};
jitsi.preferred_domain = "meet.element.io";
element_call.url = "https://call.element.io";
2023-01-08 15:49:53 +01:00
};
};
};
}