diff --git a/docs/default.nix b/docs/default.nix index e3b15ec..b596384 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -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]; diff --git a/modules/globals/default.nix b/modules/globals/default.nix index b28ea12..3f411ec 100644 --- a/modules/globals/default.nix +++ b/modules/globals/default.nix @@ -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) ''; @@ -35,6 +35,9 @@ in sanchonet = 4; private = 42; }; + description = '' + Cardano network numbers + ''; internal = true; }; };