ctucx.git: nixfiles

ctucx' nixfiles

commit e47e8f6c1f266ed6e55370f44624a3d98380e62c
parent d528a423ca5b15212b0a111787c550e346a68163
Author: Katja (ctucx) <git@ctu.cx>
Date: Mon, 2 Dec 2024 11:13:29 +0100

machines/trabbi/matrix: update cinny config
1 file changed, 9 insertions(+), 22 deletions(-)
M
machines/trabbi/matrix/synapse.nix
|
31
+++++++++----------------------
diff --git a/machines/trabbi/matrix/synapse.nix b/machines/trabbi/matrix/synapse.nix
@@ -39,7 +39,7 @@
     matrix-synapse = {
       enable         = true;
       withJemalloc   = true;
-      settings       = {
+      settings = {
         server_name                     = "ctu.cx";
         public_baseurl                  = "https://matrix.ctu.cx/";
         max_upload_size                 = "100M";

@@ -100,27 +100,14 @@
               return 200 '${builtins.toJSON matrixClientConfig}';
             '';
 
-            "/"                  = {
-              extraConfig        = ''
-                rewrite ^/config.json$ /config.json break;
-                rewrite ^/manifest.json$ /manifest.json break;
-
-                rewrite ^.*/olm.wasm$ /olm.wasm break;
-                rewrite ^/pdf.worker.min.js$ /pdf.worker.min.js break;
-
-                rewrite ^/public/(.*)$ /public/$1 break;
-                rewrite ^/assets/(.*)$ /assets/$1 break;
-
-                rewrite ^(.+)$ /index.html break;
-              '';
-              root             = pkgs.cinny.override {
-                conf = {
-                  defaultHomeserver = 0;
-                  homeserverList    = [
-                    "matrix.ctu.cx"
-                  ];
-                  allowCustomHomesevrers = false;
-                };
+            "/".root = pkgs.cinny.override {
+              conf = {
+                defaultHomeserver = 0;
+                homeserverList    = [
+                  "matrix.ctu.cx"
+                ];
+                allowCustomHomeservers = false;
+                hashRouter.enabled     = true;
               };
             };
           };