Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/types.nix
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,12 @@ rec {

# Deprecated; should not be used because it quietly concatenates
# strings, which is usually not what you want.
string = throw "The type `types.string` is deprecated. See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types.";
# We use a lib.warn because `deprecationMessage` doesn't trigger in nested types such as `attrsOf string`
string = lib.warn
"The type `types.string` is deprecated. See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types."
(separatedString "" // {
name = "string";
});

passwdEntry = entryType: addCheck entryType (str: !(hasInfix ":" str || hasInfix "\n" str)) // {
name = "passwdEntry ${entryType.name}";
Expand Down