diff options
author | Rory& <root@rory.gay> | 2024-07-04 16:38:18 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-07-04 16:38:18 +0200 |
commit | 22827997825f30a8c9c42534128f1756287ae80d (patch) | |
tree | 1a4aaabac9b7838ecc9ed2199c88fef056193ce3 /host/Rory-nginx/services/matrix/synapse/workers/module.nix | |
parent | Federation senders on instance map (diff) | |
download | Rory-Open-Architecture-22827997825f30a8c9c42534128f1756287ae80d.tar.xz |
User dir worker
Diffstat (limited to 'host/Rory-nginx/services/matrix/synapse/workers/module.nix')
-rw-r--r-- | host/Rory-nginx/services/matrix/synapse/workers/module.nix | 42 |
1 files changed, 13 insertions, 29 deletions
diff --git a/host/Rory-nginx/services/matrix/synapse/workers/module.nix b/host/Rory-nginx/services/matrix/synapse/workers/module.nix index b9c490e..ad3e2a0 100644 --- a/host/Rory-nginx/services/matrix/synapse/workers/module.nix +++ b/host/Rory-nginx/services/matrix/synapse/workers/module.nix @@ -46,6 +46,7 @@ in enableStreamWriters = lib.mkEnableOption "Enable stream writers"; enableAppserviceWorker = lib.mkEnableOption "Enable dedicated appservice worker"; enableBackgroundWorker = lib.mkEnableOption "Enable dedicated background task worker"; + enableUserDirWorker = lib.mkEnableOption "Enable dedicated user directory worker"; federationSenders = lib.mkOption { type = lib.types.int; @@ -57,36 +58,19 @@ in default = 0; description = "Number of pushers"; }; + + nginxVirtualHostName = lib.mkOption { + type = lib.types.str; + description = "The virtual host name for the nginx server"; + }; }; - config = lib.mkIf cfg.enableStreamWriters { - #services.matrix-synapse = { - # settings = { - # instance_map = lib.listToAttrs (lib.map (index: { - # name = "stream-writer-${toString index}"; - # value = { - # path = "/run/matrix-synapse/stream-writer-${toString index}.sock"; - # }; - # }) federationSenders); - # - # stream_writers = { - # events = lib.map (index: "stream-writer-events-${toString index}") federationSenders; - # typing = lib.map (index: "stream-writer-typing-${toString index}") typingWriters; - # to_device = lib.map (index: "stream-writer-to_device-${toString index}") deviceWriters; - # account_data = lib.map (index: "stream-writer-account_data-${toString index}") accountDataWriters; - # receipts = lib.map (index: "stream-writer-receipts-${toString index}") receiptsWriters; - # presence = lib.map (index: "stream-writer-presence-${toString index}") presenceWriters; - # push_rules = lib.map (index: "stream-writer-push_rules-${toString index}") pusherWriters; - # }; - # }; - # - # workers = lib.listToAttrs (lib.map (index: { - # name = "stream-writerr-${toString index}"; - # value = { - # worker_app = "synapse.app.generic_worker"; - # worker_listeners = [ ]; - # }; - # }) federationSenders); - #}; + config = { + assertions = [ + { + assertion = cfg.enableUserDirWorker -> cfg.nginxVirtualHostName != null; + message = "nginxVirtualHostName must be set when enableUserDirWorker is true"; + } + ]; }; } |