{ config, lib, ... }: let cfg = config.services.matrix-synapse; workerName = "appservice"; workerRoutes = [ ]; in { services.matrix-synapse = lib.mkIf cfg.enableAppserviceWorker { settings = { instance_map = { appservice = { path = "/run/matrix-synapse/${workerName}.sock"; }; }; notify_appservices_from_worker = workerName; }; workers = { appservice = { worker_app = "synapse.app.generic_worker"; worker_listeners = [ { type = "http"; path = "/run/matrix-synapse/${workerName}.sock"; resources = [ { names = [ "replication" ]; compress = false; } ]; } ]; }; }; }; }