Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,22 @@
lib.mapAttrs' (
name: value:
lib.nameValuePair
(builtins.head (lib.plitString "." name)) # take foo.options and turn it into just foo
(builtins.head (lib.splitString "." name)) # take foo.options and turn it into just foo

(pkgs.nixosOptionsDoc {
# By default `nixosOptionsDoc` will ignore internal options but we want to show them
# This hack will make all the options not internal and visible and optionally append to the
# description a new field which is then corrected rendered as it was a native field
transformOptions = opt:
opt
// {
internal = false;
visible = true;
description = ''
${lib.traceVal opt.description}
${lib.optionalString opt.internal "*Internal:* true"}
'';
};
options =
(lib.evalModules {
modules = (import "${inputs.nixpkgs}/nixos/modules/module-list.nix") ++ [value];
Expand Down
5 changes: 4 additions & 1 deletion modules/globals/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ in
networkNumber = lib.mkOption {
type = types.int;
default = cfg.networkNumbers.${cfg.network};
defaultText = lib.literalExpression "config.cardanoNix.globals.networkNumbers.$${config.cardanoNix.globals.net}";
defaultText = lib.literalExpression "config.cardanoNix.globals.networkNumbers.\${config.cardanoNix.globals.net}";
description = ''
Cardano network number to join/use (should match cardanoNix.globals,network)
'';
Expand All @@ -35,6 +35,9 @@ in
sanchonet = 4;
private = 42;
};
description = ''
Cardano network numbers
'';
internal = true;
};
};
Expand Down