about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2022-05-16 17:03:37 +0200
committerGitHub <noreply@github.com>2022-05-16 17:03:37 +0200
commite06f66e73c5316cf25ec3d9cb8f08e072da61590 (patch)
tree68211bce234d68c560314ccbba95bfa2f31d4e41
parent3e789af26cb39c8e25678616c184579532562058 (diff)
parent9252a7daa80bf81e76bf826caef8cb6dd08b1325 (diff)
Merge pull request #170561 from klemensn/types-description
lib/types: Drop misleading plural from type descriptions
-rwxr-xr-xlib/tests/modules.sh2
-rw-r--r--lib/types.nix6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh
index cc13a8d38e375..82d3dd96e88bb 100755
--- a/lib/tests/modules.sh
+++ b/lib/tests/modules.sh
@@ -313,7 +313,7 @@ checkConfigOutput "bar" config.priorities ./raw.nix
 
 ## Option collision
 checkConfigError \
-  'The option .set. in module .*/declare-set.nix. would be a parent of the following options, but its type .attribute set of signed integers. does not support nested options.\n\s*- option[(]s[)] with prefix .set.enable. in module .*/declare-enable-nested.nix.' \
+  'The option .set. in module .*/declare-set.nix. would be a parent of the following options, but its type .attribute set of signed integer. does not support nested options.\n\s*- option[(]s[)] with prefix .set.enable. in module .*/declare-enable-nested.nix.' \
   config.set \
   ./declare-set.nix ./declare-enable-nested.nix
 
diff --git a/lib/types.nix b/lib/types.nix
index 91b040d24553b..e4b3f358d1c9a 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -397,7 +397,7 @@ rec {
 
     listOf = elemType: mkOptionType rec {
       name = "listOf";
-      description = "list of ${elemType.description}s";
+      description = "list of ${elemType.description}";
       check = isList;
       merge = loc: defs:
         map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
@@ -426,7 +426,7 @@ rec {
 
     attrsOf = elemType: mkOptionType rec {
       name = "attrsOf";
-      description = "attribute set of ${elemType.description}s";
+      description = "attribute set of ${elemType.description}";
       check = isAttrs;
       merge = loc: defs:
         mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
@@ -449,7 +449,7 @@ rec {
     # error that it's not defined. Use only if conditional definitions don't make sense.
     lazyAttrsOf = elemType: mkOptionType rec {
       name = "lazyAttrsOf";
-      description = "lazy attribute set of ${elemType.description}s";
+      description = "lazy attribute set of ${elemType.description}";
       check = isAttrs;
       merge = loc: defs:
         zipAttrsWith (name: defs: