forked from danio/nixos-matrix-modules
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0e0fd9f6a4 | |||
|
31e5b1ff26
|
@@ -372,12 +372,19 @@ in {
|
|||||||
systemd.services = let
|
systemd.services = let
|
||||||
workerList = lib.mapAttrsToList lib.nameValuePair wcfg.instances;
|
workerList = lib.mapAttrsToList lib.nameValuePair wcfg.instances;
|
||||||
workerConfig = worker:
|
workerConfig = worker:
|
||||||
format.generate "matrix-synapse-worker-${worker.name}-config.yaml"
|
format.generate "matrix-synapse-worker-${worker.name}-config.yaml" (
|
||||||
(worker.value.settings // {
|
worker.value.settings
|
||||||
worker_name = worker.name;
|
//
|
||||||
worker_listeners =
|
{
|
||||||
map (lib.filterAttrsRecursive (_: v: v != null)) worker.value.settings.worker_listeners;
|
worker_name = worker.name;
|
||||||
});
|
worker_listeners = map (lib.filterAttrsRecursive (_: v: v != null)) worker.value.settings.worker_listeners;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
# NOTE: the workers cannot pick up creds from `/run/credentials/matrix-synapse.service/*`
|
||||||
|
(lib.optionalAttrs usesCustomSigningKeyPath {
|
||||||
|
signing_key_path = "/run/credentials/matrix-synapse-worker-${worker.name}.service/signing_key";
|
||||||
|
})
|
||||||
|
);
|
||||||
in builtins.listToAttrs (lib.flip map workerList (worker: {
|
in builtins.listToAttrs (lib.flip map workerList (worker: {
|
||||||
name = "matrix-synapse-worker-${worker.name}";
|
name = "matrix-synapse-worker-${worker.name}";
|
||||||
value = {
|
value = {
|
||||||
|
|||||||
Reference in New Issue
Block a user