diff options
author | Naïm Favier <n@monade.li> | 2021-10-03 18:06:03 +0200 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2021-10-04 12:47:20 +0200 |
commit | 2ddc335e6f32b875e14ad9610101325b306a0add (patch) | |
tree | 2a4591c137cb363a6ec09f529d587a10aa7a0bc7 /nixos/doc/manual/development/option-declarations.section.md | |
parent | 330b1e08b8df4e1f0100a0a7810ec3157749e5ee (diff) |
nixos/doc: clean up defaults and examples
Diffstat (limited to 'nixos/doc/manual/development/option-declarations.section.md')
-rw-r--r-- | nixos/doc/manual/development/option-declarations.section.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/doc/manual/development/option-declarations.section.md b/nixos/doc/manual/development/option-declarations.section.md index 819c23684cdf7..be56529992ab1 100644 --- a/nixos/doc/manual/development/option-declarations.section.md +++ b/nixos/doc/manual/development/option-declarations.section.md @@ -38,9 +38,19 @@ The function `mkOption` accepts the following arguments. of the module will have to define the value of the option, otherwise an error will be thrown. +`defaultText` + +: A textual representation of the default value to be rendered verbatim in + the manual. Useful if the default value is a complex expression or depends + on other values or packages. + Use `lib.literalExpression` for a Nix expression, `lib.literalDocBook` for + a plain English description in DocBook format. + `example` : An example value that will be shown in the NixOS manual. + You can use `lib.literalExpression` and `lib.literalDocBook` in the same way + as in `defaultText`. `description` |