diff options
author | Rory& <root@rory.gay> | 2024-07-01 18:32:45 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-07-04 14:45:02 +0200 |
commit | f5d72806b561c041f2dcccfd27aa6691462be32a (patch) | |
tree | ec7389c302bda59344bcb5474ae7e960f2ee22ba /host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix | |
parent | Split up synapse config (diff) | |
download | Rory-Open-Architecture-f5d72806b561c041f2dcccfd27aa6691462be32a.tar.xz |
Synapse changes for testing
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.nix | 28 |
1 files changed, 28 insertions, 0 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 new file mode 100644 index 0000000..05221de --- /dev/null +++ b/host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix @@ -0,0 +1,28 @@ +{ config, pkgs, lib, ... }: +let + cfg = config.services.matrix-synapse; + federationSenders = lib.range 0 (cfg.federationSenders - 1); +in +{ + services.matrix-synapse = lib.mkIf (cfg.federationSenders > 0) { + settings = { + instance_map = lib.listToAttrs (lib.map (index: { + name = "federation_sender-${toString index}"; + value = { + path = "/run/synapse/federation_sender-${toString index}.sock"; + }; + }) federationSenders); + + send_federation = false; + federation_sender_instances = 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 = [ ]; + }; + }) federationSenders); + }; +} \ No newline at end of file |