rtl: make extraConfig recursively mergeable

Previously, when merging different definitions of `extraConfig`,
only the top-level attrset was merged.

Example:
The two separate settings
  nodes.lnd.extraConfig.Settings.userPersona = "MERCHANT";
  nodes.lnd.extraConfig.Settings.logLevel = "DEBUG";
were previously merged into
  nodes.lnd.extraConfig.Settings = { logLevel = "DEBUG" };
(The last definition has precedence.)
This commit is contained in:
Erik Arvstedt 2023-01-20 13:45:08 +01:00
parent b76728a1ec
commit 5634f08873
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -27,7 +27,7 @@ let
description = mdDoc "Enable the clightning node interface.";
};
extraConfig = mkOption {
type = types.attrs;
type = with types; attrsOf anything;
default = {};
example = {
Settings.userPersona = "MERCHANT";
@ -52,7 +52,7 @@ let
description = mdDoc "Enable swaps with lightning-loop.";
};
extraConfig = mkOption {
type = types.attrs;
type = with types; attrsOf anything;
default = {};
example = {
Settings.userPersona = "MERCHANT";