From 2ddc335e6f32b875e14ad9610101325b306a0add Mon Sep 17 00:00:00 2001 From: Naïm Favier Date: Sun, 3 Oct 2021 18:06:03 +0200 Subject: nixos/doc: clean up defaults and examples --- nixos/doc/manual/development/option-declarations.section.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nixos/doc/manual/development/option-declarations.section.md') 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` -- cgit 1.4.1