diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-06-14 02:12:43 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-06-14 23:01:27 +0200 |
commit | dfd98a5da26c341cf3b7e6fe7e2dbbaeb0af519c (patch) | |
tree | f47e1a16304110699fe706dab47cd2f907568be6 /lib | |
parent | 19a069ab8b17834da249b5ecb507c2eabe76a3e3 (diff) |
lib.deferredModule: Make it properly singular
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tests/modules/deferred-module.nix | 2 | ||||
-rw-r--r-- | lib/types.nix | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/tests/modules/deferred-module.nix b/lib/tests/modules/deferred-module.nix index e963c5a845c1..d03c60b029bf 100644 --- a/lib/tests/modules/deferred-module.nix +++ b/lib/tests/modules/deferred-module.nix @@ -12,7 +12,7 @@ in ({ config, ... }: { _file = "generic.nix"; options.nodes = mkOption { - type = lazyAttrsOf (submodule { imports = config.default; }); + type = lazyAttrsOf (submodule { imports = [ config.default ]; }); default = {}; }; options.default = mkOption { diff --git a/lib/types.nix b/lib/types.nix index 68dfa5843dee..354714b28733 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -549,7 +549,9 @@ rec { name = "deferredModule"; description = "module"; check = x: isAttrs x || isFunction x || path.check x; - merge = loc: defs: staticModules ++ map (def: lib.setDefaultModuleLocation "${def.file}, via option ${showOption loc}" def.value) defs; + merge = loc: defs: { + imports = staticModules ++ map (def: lib.setDefaultModuleLocation "${def.file}, via option ${showOption loc}" def.value) defs; + }; inherit (submoduleWith { modules = staticModules; }) getSubOptions getSubModules; |