diff options
author | Minijackson <minijackson@riseup.net> | 2023-02-27 11:04:18 +0100 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2023-02-27 11:05:48 +0100 |
commit | cb42abfe282a373540d018f44597e3b136946586 (patch) | |
tree | f94be0c50a4722df8a3fbd0e7564adda74ca0439 /README.md | |
parent | 61589d39015547dec4835f509b10bf9378db9cf8 (diff) | |
download | nix-module-doc-cb42abfe282a373540d018f44597e3b136946586.tar.gz nix-module-doc-cb42abfe282a373540d018f44597e3b136946586.zip |
README: init
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 | ``` | ||