mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 18:56:16 +02:00
22 lines
662 B
Nix
22 lines
662 B
Nix
|
with builtins;
|
||
|
with import ./utils.nix;
|
||
|
|
||
|
options:
|
||
|
|
||
|
concatStrings (map
|
||
|
(name:
|
||
|
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 "`" + toString option.value + "`") + "\n\n"
|
||
|
+ (if option.aliases != []
|
||
|
then " **Deprecated alias:** " + (concatStringsSep ", " (map (s: "`${s}`") option.aliases)) + "\n\n"
|
||
|
else "")
|
||
|
)
|
||
|
(attrNames options))
|