diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..70eeb2a --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,33 @@ | |||
1 | # nix-module-doc | ||
2 | |||
3 | Generate documentation for your NixOS-like modules. | ||
4 | |||
5 | `nix-module-doc` is capable of generating a markdown file, a manpage, and an | ||
6 | mkbook. | ||
7 | |||
8 | ## Usage | ||
9 | |||
10 | In your `flake.nix` | ||
11 | |||
12 | ```nix | ||
13 | { | ||
14 | inputs.nix-module-doc.url = "github:minijackson/nix-module-doc"; | ||
15 | |||
16 | outputs = inputs: { | ||
17 | nixosModule.yourModule = let | ||
18 | docParams = { | ||
19 | # Where to store the outputs | ||
20 | outputAttrPath = ["your" "module" "outputs"]; | ||
21 | # Where to store the documentation options | ||
22 | optionsAttrPath = ["your" "module" "doc"]; | ||
23 | }; | ||
24 | in { | ||
25 | imports = [ | ||
26 | (inputs.nix-module-doc.lib.modules.doc-options-md docParams) | ||
27 | (inputs.nix-module-doc.lib.modules.manpage docParams) | ||
28 | (inputs.nix-module-doc.lib.modules.mdbook docParams) | ||
29 | ]; | ||
30 | } | ||
31 | }; | ||
32 | } | ||
33 | ``` | ||