summary refs log tree commit diff
path: root/host/Rory-nginx/services/matrix/synapse/workers/pusher.nix
diff options
context:
space:
mode:
Diffstat (limited to 'host/Rory-nginx/services/matrix/synapse/workers/pusher.nix')
-rw-r--r--host/Rory-nginx/services/matrix/synapse/workers/pusher.nix61
1 files changed, 35 insertions, 26 deletions
diff --git a/host/Rory-nginx/services/matrix/synapse/workers/pusher.nix b/host/Rory-nginx/services/matrix/synapse/workers/pusher.nix
index c90561e..f5ef601 100644
--- a/host/Rory-nginx/services/matrix/synapse/workers/pusher.nix
+++ b/host/Rory-nginx/services/matrix/synapse/workers/pusher.nix
@@ -1,4 +1,9 @@
-{ config, pkgs, lib, ... }:
+{
+  config,
+  pkgs,
+  lib,
+  ...
+}:
 let
   cfg = config.services.matrix-synapse;
   pushers = lib.range 0 (cfg.pushers - 1);
@@ -7,34 +12,38 @@ in
   config = lib.mkIf (cfg.pushers > 0) {
     services.matrix-synapse = {
       settings = {
-        instance_map = lib.listToAttrs (lib.map (index: {
-          name = "pusher-${toString index}";
-          value = {
-            path = "/run/matrix-synapse/pusher-${toString index}.sock";
-          };
-        }) pushers);
+        instance_map = lib.listToAttrs (
+          lib.map (index: {
+            name = "pusher-${toString index}";
+            value = {
+              path = "/run/matrix-synapse/pusher-${toString index}.sock";
+            };
+          }) pushers
+        );
 
         pusher_instances = lib.map (index: "pusher-${toString index}") pushers;
       };
 
-      workers = lib.listToAttrs (lib.map (index: {
-        name = "pusher-${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;
-                }
-              ];
-            }
-          ];
-        };
-      }) pushers);
+      workers = lib.listToAttrs (
+        lib.map (index: {
+          name = "pusher-${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;
+                  }
+                ];
+              }
+            ];
+          };
+        }) pushers
+      );
     };
   };
-}
\ No newline at end of file
+}