diff --git a/lib/modules.nix b/lib/modules.nix index 3d57c3dd062d..7716e855ebb2 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -1177,8 +1177,6 @@ let map (mapAttrs (n: v: mkIf cfg.condition v)) (pushDownProperties cfg.content) else if cfg._type or "" == "override" then map (mapAttrs (n: v: mkOverride cfg.priority v)) (pushDownProperties cfg.content) - # else if cfg._type or "" == "definition" then - # map (mapAttrs (n: v: mkDefinition v)) (pushDownProperties cfg.content) # FIXME: handle mkOrder? else [ cfg ]; diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index e623c0fb55b8..9df6e61797b7 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -673,6 +673,14 @@ checkConfigError 'The option .conflictingPathOptionType. in .*/pathWith.nix. is # types.pathWith { inStore = true; absolute = false; } checkConfigError 'In pathWith, inStore means the path must be absolute' config.impossiblePathOptionType ./pathWith.nix +# mkDefinition +# check that mkDefinition 'file' is printed in the error message +checkConfigError 'Cannot merge definitions.*\n\s*- In .file.*\n\s*- In .other.*' config.conflict ./mkDefinition.nix +checkConfigError 'A definition for option .viaOptionDefault. is not of type .boolean.*' config.viaOptionDefault ./mkDefinition.nix +checkConfigOutput '^true$' config.viaConfig ./mkDefinition.nix +checkConfigOutput '^true$' config.mkMerge ./mkDefinition.nix +checkConfigOutput '^true$' config.mkForce ./mkDefinition.nix + cat <