diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2023-10-15 16:16:28 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2023-10-15 16:16:28 +0200 |
commit | e5928d9a73678749def663f838aef4b9d37b1488 (patch) | |
tree | 499589783d496a56fe78640edb5c2a0fff44c3c4 /nixos/modules/services/matrix | |
parent | cb67bb0335554e213b823f1561251dfb9dff857e (diff) | |
download | nixlib-e5928d9a73678749def663f838aef4b9d37b1488.tar nixlib-e5928d9a73678749def663f838aef4b9d37b1488.tar.gz nixlib-e5928d9a73678749def663f838aef4b9d37b1488.tar.bz2 nixlib-e5928d9a73678749def663f838aef4b9d37b1488.tar.lz nixlib-e5928d9a73678749def663f838aef4b9d37b1488.tar.xz nixlib-e5928d9a73678749def663f838aef4b9d37b1488.tar.zst nixlib-e5928d9a73678749def663f838aef4b9d37b1488.zip |
nixos/synapse: `mkDefault` each value of the log config
That way it's not even needed to specify an `mkForce` when changing existing attributes, e.g. root's log level.
Diffstat (limited to 'nixos/modules/services/matrix')
-rw-r--r-- | nixos/modules/services/matrix/synapse.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/services/matrix/synapse.nix b/nixos/modules/services/matrix/synapse.nix index 10534ea23521..0cf2736bad45 100644 --- a/nixos/modules/services/matrix/synapse.nix +++ b/nixos/modules/services/matrix/synapse.nix @@ -393,12 +393,14 @@ in { description = mdDoc '' Default configuration for the loggers used by `matrix-synapse` and its workers. The defaults are added with the default priority which means that - these will be merged with additional declarations. For instance + these will be merged with additional declarations. These additional + declarations also take precedence over the defaults when declared + with at least normal priority. For instance the log-level for synapse and its workers can be changed like this: ```nix { lib, ... }: { - services.matrix-synapse.log.root.level = lib.mkForce "WARNING"; + services.matrix-synapse.log.root.level = "WARNING"; } ``` @@ -1042,7 +1044,7 @@ in { # default them, so they are additive services.matrix-synapse.extras = defaultExtras; - services.matrix-synapse.log = defaultCommonLogConfig; + services.matrix-synapse.log = mapAttrsRecursive (const mkDefault) defaultCommonLogConfig; users.users.matrix-synapse = { group = "matrix-synapse"; |