diff options
author | Théophane Hufschmitt <regnat@users.noreply.github.com> | 2021-12-14 09:14:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 09:14:25 +0100 |
commit | 6234e1c8115b876bcb01337952def1e1f23ffc69 (patch) | |
tree | 1d2528813d3c45f279cc0801c4645ad8708879fc /doc | |
parent | 3fc8042f77d488d3ebc9b3aefb3c54cec38fa432 (diff) | |
parent | 21520297dad8a198004e4551808a4818a8de7ddd (diff) |
Merge pull request #5702 from baloo/baloo/hide-non-reproducible-settings
reproducibility: hide non-reproducible settings from manual
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual/generate-options.nix | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/doc/manual/generate-options.nix b/doc/manual/generate-options.nix index 3c31a4eec..9a77f4d36 100644 --- a/doc/manual/generate-options.nix +++ b/doc/manual/generate-options.nix @@ -8,17 +8,19 @@ concatStrings (map let option = options.${name}; in " - `${name}` \n\n" + concatStrings (map (s: " ${s}\n") (splitLines option.description)) + "\n\n" - + " **Default:** " + ( - if option.value == "" || option.value == [] - then "*empty*" - else if isBool option.value - then (if option.value then "`true`" else "`false`") - else - # n.b. a StringMap value type is specified as a string, but - # this shows the value type. The empty stringmap is "null" in - # JSON, but that converts to "{ }" here. - (if isAttrs option.value then "`\"\"`" - else "`" + toString option.value + "`")) + "\n\n" + + (if option.documentDefault + then " **Default:** " + ( + if option.value == "" || option.value == [] + then "*empty*" + else if isBool option.value + then (if option.value then "`true`" else "`false`") + else + # n.b. a StringMap value type is specified as a string, but + # this shows the value type. The empty stringmap is "null" in + # JSON, but that converts to "{ }" here. + (if isAttrs option.value then "`\"\"`" + else "`" + toString option.value + "`")) + "\n\n" + else " **Default:** *machine-specific*") + (if option.aliases != [] then " **Deprecated alias:** " + (concatStringsSep ", " (map (s: "`${s}`") option.aliases)) + "\n\n" else "") |