summary refs log tree commit diff
path: root/host/Rory-nginx/services/matrix/synapse/workers/client-reader.nix
diff options
context:
space:
mode:
Diffstat (limited to 'host/Rory-nginx/services/matrix/synapse/workers/client-reader.nix')
-rw-r--r--host/Rory-nginx/services/matrix/synapse/workers/client-reader.nix69
1 files changed, 39 insertions, 30 deletions
diff --git a/host/Rory-nginx/services/matrix/synapse/workers/client-reader.nix b/host/Rory-nginx/services/matrix/synapse/workers/client-reader.nix
index c89b147..5f3acbc 100644
--- a/host/Rory-nginx/services/matrix/synapse/workers/client-reader.nix
+++ b/host/Rory-nginx/services/matrix/synapse/workers/client-reader.nix
@@ -2,37 +2,46 @@
 
 let
   cfg = config.services.matrix-synapse;
+  dbGroup = "small";
+  hasClientResource = false;
+  hasFederationResource = false;
   workers = lib.range 0 (cfg.clientReaders - 1);
   workerName = "client_reader";
-  routes = [
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$"
-    "~ ^/_matrix/client/v1/rooms/.*/hierarchy$"
-    "~ ^/_matrix/client/(v1|unstable)/rooms/.*/relations/"
-    "~ ^/_matrix/client/v1/rooms/.*/threads$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/login$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/account/3pid$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/account/whoami$"
-    "~ ^/_matrix/client/versions$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$"
-    "~ ^/_matrix/client/(r0|v3|unstable)/register$"
-    "~ ^/_matrix/client/(r0|v3|unstable)/register/available$"
-    "~ ^/_matrix/client/(r0|v3|unstable)/auth/.*/fallback/web$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/messages$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable/.*)/rooms/.*/aliases"
-    "~ ^/_matrix/client/v1/rooms/.*/timestamp_to_event$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/search"
-    "~ ^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$)"
-    "~ ^/_matrix/client/(r0|v3|unstable)/password_policy$"
-    "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/directory/room/.*$"
-    "~ ^/_matrix/client/(r0|v3|unstable)/capabilities$"
-    "~ ^/_matrix/client/(r0|v3|unstable)/notifications$"
-  ];
+  routes =
+    [
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*$"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$"
+      "~ ^/_matrix/client/v1/rooms/.*/hierarchy$"
+      "~ ^/_matrix/client/(v1|unstable)/rooms/.*/relations/"
+      "~ ^/_matrix/client/v1/rooms/.*/threads$"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/messages$"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable/.*)/rooms/.*/aliases"
+      "~ ^/_matrix/client/v1/rooms/.*/timestamp_to_event$"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/search"
+      "~ ^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$)"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/directory/room/.*$"
+      "~ ^/_matrix/client/(r0|v3|unstable)/notifications$"
+
+      # unstable
+      "~ ^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$"
+    ]
+    ++ lib.optionals (cfg.authWorkers == 0) [
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/login$"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/account/3pid$"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/account/whoami$"
+      "~ ^/_matrix/client/versions$"
+      "~ ^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$"
+      "~ ^/_matrix/client/(r0|v3|unstable)/register$"
+      "~ ^/_matrix/client/(r0|v3|unstable)/register/available$"
+      "~ ^/_matrix/client/(r0|v3|unstable)/auth/.*/fallback/web$"
+      "~ ^/_matrix/client/(r0|v3|unstable)/password_policy$"
+      "~ ^/_matrix/client/(r0|v3|unstable)/capabilities$"
+    ];
 in
 {
   config = lib.mkIf (cfg.clientReaders > 0) {
@@ -78,8 +87,8 @@ in
             ];
             database = (
               import ../db.nix {
+                inherit dbGroup;
                 workerName = "${workerName}-${toString index}";
-                dbGroup = "medium";
               }
             );
           };