diff --git a/lib/tests/modules/deferred-module.nix b/lib/tests/modules/deferred-module.nix index dc8072d4e6c3..e963c5a845c1 100644 --- a/lib/tests/modules/deferred-module.nix +++ b/lib/tests/modules/deferred-module.nix @@ -34,9 +34,7 @@ in { _file = "default-a-is-b.nix"; - default = { config, ... }: { - settingsDict.a = config.settingsDict.b; - }; + default = ./define-settingsDict-a-is-b.nix; } { diff --git a/lib/tests/modules/define-settingsDict-a-is-b.nix b/lib/tests/modules/define-settingsDict-a-is-b.nix new file mode 100644 index 000000000000..42363f45f78d --- /dev/null +++ b/lib/tests/modules/define-settingsDict-a-is-b.nix @@ -0,0 +1,3 @@ +{ config, ... }: { + settingsDict.a = config.settingsDict.b; +} diff --git a/lib/types.nix b/lib/types.nix index 83882179d06d..f5d13ea10d28 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -543,7 +543,7 @@ rec { deferredModule = mkOptionType { name = "deferredModule"; description = "module"; - check = t: isAttrs t || isFunction t; + check = x: isAttrs x || isFunction x || path.check x; merge = loc: defs: map (def: lib.setDefaultModuleLocation "${def.file}, via option ${showOption loc}" def.value) defs; };