mirror of
https://github.com/dali99/nixos-matrix-modules.git
synced 2026-06-28 18:35:23 +02:00
Pass signing_key_path through LoadCredential
This commit is contained in:
@@ -13,6 +13,7 @@ let
|
|||||||
matrix-synapse-common-config = format.generate "matrix-synapse-common-config.yaml" (cfg.settings // {
|
matrix-synapse-common-config = format.generate "matrix-synapse-common-config.yaml" (cfg.settings // {
|
||||||
listeners = map (lib.filterAttrsRecursive (_: v: v != null)) cfg.settings.listeners;
|
listeners = map (lib.filterAttrsRecursive (_: v: v != null)) cfg.settings.listeners;
|
||||||
media_store_path = "/var/lib/matrix-synapse/media_store";
|
media_store_path = "/var/lib/matrix-synapse/media_store";
|
||||||
|
signing_key_path = "/run/credentials/matrix-synapse.service/signing_key";
|
||||||
});
|
});
|
||||||
|
|
||||||
# TODO: Align better with the upstream module
|
# TODO: Align better with the upstream module
|
||||||
@@ -511,6 +512,7 @@ in
|
|||||||
(lib.filter (path: path != "/run/matrix-synapse"))
|
(lib.filter (path: path != "/run/matrix-synapse"))
|
||||||
lib.uniqueStrings
|
lib.uniqueStrings
|
||||||
];
|
];
|
||||||
|
LoadCredential = [ "signing_key:${cfg.settings.signing_key_path}" ];
|
||||||
RemoveIPC = true;
|
RemoveIPC = true;
|
||||||
RestrictAddressFamilies = [
|
RestrictAddressFamilies = [
|
||||||
"AF_INET"
|
"AF_INET"
|
||||||
|
|||||||
@@ -375,6 +375,7 @@ in {
|
|||||||
worker_name = worker.name;
|
worker_name = worker.name;
|
||||||
worker_listeners =
|
worker_listeners =
|
||||||
map (lib.filterAttrsRecursive (_: v: v != null)) worker.value.settings.worker_listeners;
|
map (lib.filterAttrsRecursive (_: v: v != null)) worker.value.settings.worker_listeners;
|
||||||
|
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}";
|
||||||
@@ -448,6 +449,7 @@ in {
|
|||||||
(lib.filter (path: path != "/run/matrix-synapse"))
|
(lib.filter (path: path != "/run/matrix-synapse"))
|
||||||
lib.uniqueStrings
|
lib.uniqueStrings
|
||||||
];
|
];
|
||||||
|
LoadCredential = [ "signing_key:${cfg.settings.signing_key_path}" ];
|
||||||
RemoveIPC = true;
|
RemoveIPC = true;
|
||||||
RestrictAddressFamilies = [
|
RestrictAddressFamilies = [
|
||||||
"AF_INET"
|
"AF_INET"
|
||||||
|
|||||||
Reference in New Issue
Block a user