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 pagetemplatePath: 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)optionsDocArgs: additional arguments to pass to thenixosOptionsDocpackage