2021-07-03 06:09:57 +02:00
|
|
|
# Writing NixOS Documentation {#sec-writing-documentation}
|
|
|
|
|
|
|
|
As NixOS grows, so too does the need for a catalogue and explanation of
|
|
|
|
its extensive functionality. Collecting pertinent information from
|
|
|
|
disparate sources and presenting it in an accessible style would be a
|
|
|
|
worthy contribution to the project.
|
|
|
|
|
|
|
|
## Building the Manual {#sec-writing-docs-building-the-manual}
|
|
|
|
|
2023-10-30 14:17:47 +01:00
|
|
|
The sources of the [](#book-nixos-manual) are in the
|
2021-07-03 06:09:57 +02:00
|
|
|
[`nixos/doc/manual`](https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual)
|
|
|
|
subdirectory of the Nixpkgs repository.
|
|
|
|
|
|
|
|
You can quickly validate your edits with `make`:
|
|
|
|
|
|
|
|
```ShellSession
|
|
|
|
$ cd /path/to/nixpkgs/nixos/doc/manual
|
|
|
|
$ nix-shell
|
2023-10-19 13:43:03 +02:00
|
|
|
nix-shell$ devmode
|
2021-07-03 06:09:57 +02:00
|
|
|
```
|
|
|
|
|
2022-12-21 21:24:48 +01:00
|
|
|
Once you are done making modifications to the manual, it's important to
|
2021-07-03 06:09:57 +02:00
|
|
|
build it before committing. You can do that as follows:
|
|
|
|
|
|
|
|
```ShellSession
|
|
|
|
nix-build nixos/release.nix -A manual.x86_64-linux
|
|
|
|
```
|
|
|
|
|
|
|
|
When this command successfully finishes, it will tell you where the
|
|
|
|
manual got generated. The HTML will be accessible through the `result`
|
|
|
|
symlink at `./result/share/doc/nixos/index.html`.
|