ndg
is a way to automatically generate an HTML document containing all the
options you use in any set of modules.
This flake exposes a package (packages.<system>.ndg-builder
a.k.a.
packages.<system>.default
), as well as an overlay (overlays.default
) to
allow accessing ndg-builder
in another nixpkgs instance.
You can override the exposed package with the following options:
rawModules
: a list of modules containingoptions
to document. For example:
[
{
options.hello = lib.mkOption {
default = "world";
description = "Example option.";
type = lib.types.str;
};
}
]
specialArgs
: thespecialArgs
to pass through to thelib.evalModules
call.evaluatedModules
: the result oflib.evalModules
applied to a list of modules containing someoptions
to document. For example:
lib.evalModules {
modules = [
{
options.hello = lib.mkOption {
default = "world";
description = "Example option.";
type = lib.types.str;
};
}
];
}
This includes anything that uses lib.evalModules
underneath, such as a NixOS,
Home Manager, or Nix-Darwin configuration. For example, in the context of a
flake:
self.nixosConfigurations.myHost
Note
rawModules
and evaluatedModules
are mutually exclusive.
title
: the title of your documentation pagesandboxing
: whether to pass--sandbox
to PandocembedResources
: whether--self-contained
should be passed to Pandoc in order to generate an entirely self-contained HTML documenttemplatePath
: path to a pandoc templatestyleSheetPath
: path to a Sassy CSS (SCSS) file that will compile to CSScodeThemePath
: path to a pandoc syntax highlighting file (note that it must be JSON with a.theme
extension)generateLinkAnchors
: whether to generate anchors next to linksoptionsDocArgs
: additional arguments to pass to thenixosOptionsDoc
package