summary refs log tree commit diff
path: root/lib/options.nix
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2021-06-16 12:27:47 +0200
committerSilvan Mosberger <contact@infinisil.com>2022-02-28 22:51:41 +0100
commit0c766a100e416611807a184ee35a0edbd11b15a4 (patch)
tree7eaf0b6814b5d18675da97ef9339d7f98d89b4d9 /lib/options.nix
parentb2d803ca57ef06b3f681db109d7f6069b2eb9bc1 (diff)
downloadnixpkgs-0c766a100e416611807a184ee35a0edbd11b15a4.tar
nixpkgs-0c766a100e416611807a184ee35a0edbd11b15a4.tar.gz
nixpkgs-0c766a100e416611807a184ee35a0edbd11b15a4.tar.bz2
nixpkgs-0c766a100e416611807a184ee35a0edbd11b15a4.tar.lz
nixpkgs-0c766a100e416611807a184ee35a0edbd11b15a4.tar.xz
nixpkgs-0c766a100e416611807a184ee35a0edbd11b15a4.tar.zst
nixpkgs-0c766a100e416611807a184ee35a0edbd11b15a4.zip
lib/options: Throw error for options without a type
Makes all options rendered in the manual throw an error if they don't
have a type specified.

This is a follow-up to #76184

Co-Authored-By: Silvan Mosberger <contact@infinisil.com>
Diffstat (limited to 'lib/options.nix')
-rw-r--r--lib/options.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/options.nix b/lib/options.nix
index 627aac24d2f..9efc1249e58 100644
--- a/lib/options.nix
+++ b/lib/options.nix
@@ -231,7 +231,7 @@ rec {
             then true
             else opt.visible or true;
           readOnly = opt.readOnly or false;
-          type = opt.type.description or null;
+          type = opt.type.description or "unspecified";
         }
         // optionalAttrs (opt ? example) { example = scrubOptionValue opt.example; }
         // optionalAttrs (opt ? default) { default = scrubOptionValue opt.default; }