diff --git a/lib/types.nix b/lib/types.nix index d1ece2402ad7..2ec8fd987c1a 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -284,8 +284,7 @@ rec { (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue ) # Push down position info. - (map (def: listToAttrs (mapAttrsToList (n: def': - { name = n; value = { inherit (def) file; value = def'; }; }) def.value)) defs))); + (map (def: mapAttrs (n: v: { inherit (def) file; value = v; }) def.value) defs))); getSubOptions = prefix: elemType.getSubOptions (prefix ++ [""]); getSubModules = elemType.getSubModules; substSubModules = m: attrsOf (elemType.substSubModules m);