From 34cb6a2f9b0cc89db287f0873c13a89941c38868 Mon Sep 17 00:00:00 2001 From: Eman Resu Date: Mon, 20 Jul 2026 09:35:28 -0400 Subject: [PATCH] lib/types/passwdEntry: partially apply hasInfix --- lib/types.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/types.nix b/lib/types.nix index 8ed7bec21713..6d6f471e51b4 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -91,6 +91,9 @@ let in if pos == null then "" else " at ${pos.file}:${toString pos.line}:${toString pos.column}"; + hasColonInfix = hasInfix ":"; + hasNewlineInfix = hasInfix "\n"; + # Internal functor to help for migrating functor.wrapped to functor.payload.elemType # Note that individual attributes can be overridden if needed. elemTypeFunctor = @@ -580,7 +583,7 @@ rec { passwdEntry = entryType: - addCheck entryType (str: !(hasInfix ":" str || hasInfix "\n" str)) + addCheck entryType (str: !(hasColonInfix str || hasNewlineInfix str)) // { name = "passwdEntry ${entryType.name}"; description = "${