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 containingoptionsto document. For example:
[
{
options.hello = lib.mkOption {
default = "world";
description = "Example option.";
type = lib.types.str;
};
}
]specialArgs: thespecialArgsto pass through to thelib.evalModulescall.evaluatedModules: the result oflib.evalModulesapplied to a list of modules containing someoptionsto 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--sandboxto PandocembedResources: whether--self-containedshould 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.themeextension)generateLinkAnchors: whether to generate anchors next to linksoptionsDocArgs: additional arguments to pass to thenixosOptionsDocpackage