diff options
author | Janne Heß <janne@hess.ooo> | 2021-06-16 12:27:47 +0200 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2022-02-28 22:51:41 +0100 |
commit | 0c766a100e416611807a184ee35a0edbd11b15a4 (patch) | |
tree | 7eaf0b6814b5d18675da97ef9339d7f98d89b4d9 /nixos/doc/manual/development | |
parent | b2d803ca57ef06b3f681db109d7f6069b2eb9bc1 (diff) |
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 'nixos/doc/manual/development')
-rw-r--r-- | nixos/doc/manual/development/option-declarations.section.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/doc/manual/development/option-declarations.section.md b/nixos/doc/manual/development/option-declarations.section.md index fff06e1ea5ba7..cb5043b528fdd 100644 --- a/nixos/doc/manual/development/option-declarations.section.md +++ b/nixos/doc/manual/development/option-declarations.section.md @@ -27,9 +27,10 @@ The function `mkOption` accepts the following arguments. `type` -: The type of the option (see [](#sec-option-types)). It may be - omitted, but that's not advisable since it may lead to errors that - are hard to diagnose. +: The type of the option (see [](#sec-option-types)). This + argument is mandatory for nixpkgs modules. Setting this is highly + recommended for the sake of documentation and type checking. In case it is + not set, a fallback type with unspecified behavior is used. `default` |