Revert "lib/types: remove loaOf"

This reverts commit c8c538f2ab.

Reason: removal did not follow a deprecation process and it hurts
        nixops 1.7 users.
This commit is contained in:
Robert Hensing 2022-12-29 00:47:50 +01:00
parent f2e37ce5b7
commit 9af74cc709

View File

@ -558,6 +558,15 @@ rec {
nestedTypes.elemType = elemType;
};
# TODO: drop this in the future:
loaOf = elemType: types.attrsOf elemType // {
name = "loaOf";
deprecationMessage = "Mixing lists with attribute values is no longer"
+ " possible; please use `types.attrsOf` instead. See"
+ " https://github.com/NixOS/nixpkgs/issues/1800 for the motivation.";
nestedTypes.elemType = elemType;
};
# Value of given type but with no merging (i.e. `uniq list`s are not concatenated).
uniq = elemType: mkOptionType rec {
name = "uniq";