diff --git a/hosts/vm/neo/matrix.nix b/hosts/vm/neo/matrix.nix index 8b1c86f..feb3b62 100644 --- a/hosts/vm/neo/matrix.nix +++ b/hosts/vm/neo/matrix.nix @@ -33,6 +33,7 @@ 443 8008 8448 + 9009 ]; }; @@ -47,6 +48,7 @@ server_name = "crans.org"; report_stats = false; + enable_metrics = true; public_baseurl = "https://matrix.crans.org/"; @@ -71,6 +73,22 @@ } ]; } + { + port = 9009; + bind_addresses = [ + "::1" + "127.0.0.1" + ]; + type = "metrics"; + x_forwarded = true; + tls = false; + resources = [ + { + names = [ "metrics" ]; + compress = false; + } + ]; + } ]; database = { @@ -115,6 +133,20 @@ app_service_config_files = [ "/var/lib/matrix-appservice-irc/registration.yml" ]; + + auto_join_rooms = [ "#root-space:crans.org" ]; + + # https://element-hq.github.io/synapse/latest/server_notices.html + server_notices = { + system_mxid_localpart = "annonces"; + system_mxid_display_name = "Annonces"; + # c'est une image envoye dans un salon qui appartient à Lzebulon... + system_mxid_avatar_url = "mxc://crans.org/LGFNjmEqqWCIEUFGIptHtSSM"; + room_name = "Annonces"; + room_avatar_url = "mxc://crans.org/LGFNjmEqqWCIEUFGIptHtSSM"; + room_topic = "Salon utilisé par les administrateurs du serveur pour vous envoyer des informations importantes"; + auto_join = true; + }; }; extraConfigFiles = [ @@ -194,6 +226,15 @@ ''; }; + locations."/_synapse/metrics" = { + proxyPass = "http://localhost:9009"; + extraConfig = '' + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $host; + ''; + }; + locations."/media" = { proxyPass = "http://localhost:11111"; extraConfig = '' diff --git a/hosts/vm/periodique/element.nix b/hosts/vm/periodique/element.nix index b3c43c3..550fa05 100644 --- a/hosts/vm/periodique/element.nix +++ b/hosts/vm/periodique/element.nix @@ -20,10 +20,14 @@ feature_group_calls = true; feature_element_call_video_rooms = true; }; - + oidc_static_clients = { + "https://note.crans.org/o/" = { + client_id = "iLfIXR823xLKmLJvk0hJsIJNaozkExH4MllZldIH"; + }; + }; # https://github.com/element-hq/element-web/blob/develop/docs/jitsi.md - "jitsi" = { - "preferred_domain" = "jitsi.crans.org"; + jitsi = { + preferred_domain = "jitsi.crans.org"; }; }; };