about summary refs log tree commit diff
path: root/nixos/doc/manual/contributing-to-this-manual.chapter.md
blob: 0a4f5403fdeb2e23db95b23c9709fcef4ad3ab63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Contributing to this manual {#chap-contributing}

The [DocBook] and CommonMark sources of the NixOS manual are in the [nixos/doc/manual](https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual) subdirectory of the [Nixpkgs](https://github.com/NixOS/nixpkgs) repository.
This manual uses the [Nixpkgs manual syntax](https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup).

You can quickly check your edits with the following:

```ShellSession
$ cd /path/to/nixpkgs
$ nix-build nixos/release.nix -A manual.x86_64-linux
```

If the build succeeds, the manual will be in `./result/share/doc/nixos/index.html`.

There's also [a convenient development daemon](https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-devmode).

**Contributing to the man pages**

The man pages are written in [DocBook] which is XML.

To see what your edits look like:

```ShellSession
$ cd /path/to/nixpkgs
$ nix-build nixos/release.nix -A manpages.x86_64-linux
```

You can then read the man page you edited by running

```ShellSession
$ man --manpath=result/share/man nixos-rebuild # Replace nixos-rebuild with the command whose manual you edited
```

If you're on a different architecture that's supported by NixOS (check nixos/release.nix) then replace `x86_64-linux` with the architecture.
`nix-build` will complain otherwise, but should also tell you which architecture you have + the supported ones.

[DocBook]: https://en.wikipedia.org/wiki/DocBook