summary refs log tree commit diff
path: root/host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix
diff options
context:
space:
mode:
Diffstat (limited to 'host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix')
-rw-r--r--host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix49
1 files changed, 28 insertions, 21 deletions
diff --git a/host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix b/host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix
index c90fe3e..d0b1774 100644
--- a/host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix
+++ b/host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix
@@ -1,5 +1,10 @@
-{ config, pkgs, lib, ... }:
-let 
+{
+  config,
+  pkgs,
+  lib,
+  ...
+}:
+let
   cfg = config.services.matrix-synapse;
   federationSenders = lib.range 0 (cfg.federationSenders - 1);
 in
@@ -12,23 +17,25 @@ in
       outbound_federation_restricted_to = lib.map (index: "federation_sender-${toString index}") federationSenders;
     };
 
-    workers = lib.listToAttrs (lib.map (index: {
-      name = "federation_sender-${toString index}";
-      value = {
-        worker_app = "synapse.app.generic_worker";
-        worker_listeners = [
-          {
-            type = "http";
-            path = "/run/matrix-synapse/pusher-${toString index}.sock";
-            resources = [
-              {
-                names = ["replication"];
-                compress = false;
-              }
-            ];
-          }
-        ];
-      };
-    }) federationSenders);
+    workers = lib.listToAttrs (
+      lib.map (index: {
+        name = "federation_sender-${toString index}";
+        value = {
+          worker_app = "synapse.app.generic_worker";
+          worker_listeners = [
+            {
+              type = "http";
+              path = "/run/matrix-synapse/pusher-${toString index}.sock";
+              resources = [
+                {
+                  names = [ "replication" ];
+                  compress = false;
+                }
+              ];
+            }
+          ];
+        };
+      }) federationSenders
+    );
   };
-}
\ No newline at end of file
+}