From 1ccf2f03d8aa4e274551106937f3832f79a24090 Mon Sep 17 00:00:00 2001 From: David Crompton Date: Sat, 14 Feb 2026 18:16:07 -0500 Subject: [PATCH] hippocampus: matrix: client: cinny -> element --- .../servers/public/matrix/client.nix | 88 +++++++++++++------ 1 file changed, 62 insertions(+), 26 deletions(-) diff --git a/machines/hippocampus/servers/public/matrix/client.nix b/machines/hippocampus/servers/public/matrix/client.nix index daf68ae..8057c1c 100644 --- a/machines/hippocampus/servers/public/matrix/client.nix +++ b/machines/hippocampus/servers/public/matrix/client.nix @@ -4,41 +4,77 @@ addr = "unix:/run/nginx/cinny.sock"; }]; locations."/" = { - root = pkgs.cinny.override { + root = pkgs.element-web.override { conf = { - defaultHomeserver = 0; - homeserverList = [ - "glia.club" + default_server_config = { + m.homeserver = { + base_url = "https://chat.glia.club"; + server_name = "glia.club"; + }; + }; + disable_custom_urls = false; + disable_guests = true; + disable_login_language_selector = false; + disable_3pid_login = false; + force_verification = false; + brand = "Element"; + integrations_ui_url = "https://scalar.vector.im/"; + integrations_rest_url = "https://scalar.vector.im/api"; + integrations_widgets_urls = [ + "https://scalar.vector.im/_matrix/integrations/v1" + "https://scalar.vector.im/api" + "https://scalar-staging.vector.im/_matrix/integrations/v1" + "https://scalar-staging.vector.im/api" ]; - allowCustomHomeservers = false; - - featuredCommunities = { - openAsDefault = false; - spaces = [ - ]; - rooms = [ - ]; - servers = [ - ]; + default_widget_container_height = 280; + default_country_code = "GB"; + show_labs_settings = true; + features = {}; + default_federate = false; + default_theme = "light"; + room_directory = { + servers = ["glia.club"]; }; - - hashRouter = { - enabled = false; - basename = "/"; + enable_presence_by_hs_url = { + "https://glia.club" = false; + "https://chat.glia.club" = false; }; + setting_defaults = { + breadcrumbs = false; + }; + jitsi = { + preferred_domain = "meet.element.io"; + }; + element_call = { + url = "https://call.element.io"; + brand = "Element Call"; + }; + map_style_url = "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"; }; }; extraConfig = '' - rewrite ^/config.json$ /config.json break; - rewrite ^/manifest.json$ /manifest.json break; + index index.html; - rewrite ^/sw.js$ /sw.js break; - rewrite ^/pdf.worker.min.js$ /pdf.worker.min.js break; + # Set no-cache for the version, config and index.html + # so that browsers always check for a new copy of Element Web. + # NB http://your-domain/ and http://your-domain/? are also covered by this - rewrite ^/public/(.*)$ /public/$1 break; - rewrite ^/assets/(.*)$ /assets/$1 break; - - rewrite ^(.+)$ /index.html break; + location = /index.html { + add_header Cache-Control "no-cache"; + } + location = /version { + add_header Cache-Control "no-cache"; + } + # covers config.json and config.hostname.json requests as it is prefix. + location /config { + add_header Cache-Control "no-cache"; + } + location /modules { + alias /modules; + } + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; ''; }; };