From 0808c7cd31aaa329aba21430b8b26c3a233dd83f Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Thu, 11 Oct 2018 21:23:11 -0400 Subject: [PATCH] lib/types: enhances separatedString's description The previous description "string" is misleading in the full options manual pages; they are actually concatenated strings, with a specific character. The empty string version ("types.string") has been special-cased to provide a better message. --- lib/types.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/types.nix b/lib/types.nix index 4e44e7521c4b..ca6794e274c3 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -194,7 +194,10 @@ rec { # separator between the values). separatedString = sep: mkOptionType rec { name = "separatedString"; - description = "string"; + description = if sep == "" + then "Concatenated string" # for types.string. + else "strings concatenated with ${builtins.toJSON sep}" + ; check = isString; merge = loc: defs: concatStringsSep sep (getValues defs); functor = (defaultFunctor name) // {