summary refs log tree commit diff
path: root/host/Rory-nginx/services/matrix/synapse/workers/stream-writers/event-stream-writer.nix
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-07-04 14:59:36 +0200
committerRory& <root@rory.gay>2024-07-04 14:59:36 +0200
commitdd7b872694441a96b8b042ccbc4b63a96d0b89b9 (patch)
tree76a25875e08415c38cdb7b5ad8f93241b387d078 /host/Rory-nginx/services/matrix/synapse/workers/stream-writers/event-stream-writer.nix
parentUpdate flake inputs (diff)
downloadRory-Open-Architecture-dd7b872694441a96b8b042ccbc4b63a96d0b89b9.tar.xz
Nixfmt
Diffstat (limited to 'host/Rory-nginx/services/matrix/synapse/workers/stream-writers/event-stream-writer.nix')
-rw-r--r--host/Rory-nginx/services/matrix/synapse/workers/stream-writers/event-stream-writer.nix62
1 files changed, 35 insertions, 27 deletions
diff --git a/host/Rory-nginx/services/matrix/synapse/workers/stream-writers/event-stream-writer.nix b/host/Rory-nginx/services/matrix/synapse/workers/stream-writers/event-stream-writer.nix
index af7e544..42e9251 100644
--- a/host/Rory-nginx/services/matrix/synapse/workers/stream-writers/event-stream-writer.nix
+++ b/host/Rory-nginx/services/matrix/synapse/workers/stream-writers/event-stream-writer.nix
@@ -1,5 +1,9 @@
-
-{ config, pkgs, lib, ... }:
+{
+  config,
+  pkgs,
+  lib,
+  ...
+}:
 let
   cfg = config.services.matrix-synapse;
   streamWriters = lib.range 0 (cfg.eventStreamWriters - 1);
@@ -7,35 +11,39 @@ in
 {
   services.matrix-synapse = {
     settings = {
-      instance_map = lib.listToAttrs (lib.map (port: {
-        name = "stream-writer-${toString port}";
-        value = {
-          path = "/run/matrix-synapse/stream-writer-${toString port}.sock";
-        };
-      }) streamWriters);
+      instance_map = lib.listToAttrs (
+        lib.map (port: {
+          name = "stream-writer-${toString port}";
+          value = {
+            path = "/run/matrix-synapse/stream-writer-${toString port}.sock";
+          };
+        }) streamWriters
+      );
 
       stream_writers = {
         events = lib.map (index: "stream-writer-events-${toString index}") streamWriters;
       };
     };
 
-    workers = lib.listToAttrs (lib.map (index: {
-      name = "stream-writer-${toString index}";
-      value = {
-        worker_app = "synapse.app.generic_worker";
-        worker_listeners = [
-          {
-            type = "http";
-            path = "/run/matrix-synapse/stream-writer-${toString index}.sock";
-            resources = [
-              {
-                names = ["replication"];
-                compress = false;
-              }
-            ];
-          }
-        ];
-      };
-    }) streamWriters);
+    workers = lib.listToAttrs (
+      lib.map (index: {
+        name = "stream-writer-${toString index}";
+        value = {
+          worker_app = "synapse.app.generic_worker";
+          worker_listeners = [
+            {
+              type = "http";
+              path = "/run/matrix-synapse/stream-writer-${toString index}.sock";
+              resources = [
+                {
+                  names = [ "replication" ];
+                  compress = false;
+                }
+              ];
+            }
+          ];
+        };
+      }) streamWriters
+    );
   };
-}
\ No newline at end of file
+}