mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
Generate the nix.conf docs from the source code
This means we don't have two (divergent) sets of option descriptions anymore.
This commit is contained in:
parent
34b22e0123
commit
c8fa39324a
10 changed files with 802 additions and 834 deletions
11
doc/manual/generate-options.jq
Normal file
11
doc/manual/generate-options.jq
Normal file
|
@ -0,0 +1,11 @@
|
|||
. | to_entries | sort_by(.key) | map(
|
||||
" - `" + .key + "` \n"
|
||||
+ (.value.description | split("\n") | map(" " + . + "\n") | join("")) + "\n\n"
|
||||
+ " **Default**: " + (
|
||||
if .value.value == "" or .value.value == []
|
||||
then "*empty*"
|
||||
elif (.value.value | type) == "array"
|
||||
then "`" + (.value.value | join(" ")) + "`"
|
||||
else "`" + (.value.value | tostring) + "`" end)
|
||||
+ "\n\n"
|
||||
) | join("")
|
Loading…
Add table
Add a link
Reference in a new issue