2021-05-09 05:21:05 +02:00
|
|
|
|
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="chap-contributing">
|
|
|
|
|
<title>Contributing to this manual</title>
|
|
|
|
|
<para>
|
2022-12-09 15:05:04 +01:00
|
|
|
|
The
|
|
|
|
|
<link xlink:href="https://en.wikipedia.org/wiki/DocBook">DocBook</link>
|
|
|
|
|
and CommonMark sources of the NixOS manual are in the
|
2021-05-09 05:21:05 +02:00
|
|
|
|
<link xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual">nixos/doc/manual</link>
|
|
|
|
|
subdirectory of the
|
|
|
|
|
<link xlink:href="https://github.com/NixOS/nixpkgs">Nixpkgs</link>
|
|
|
|
|
repository.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
You can quickly check your edits with the following:
|
|
|
|
|
</para>
|
|
|
|
|
<programlisting>
|
|
|
|
|
$ cd /path/to/nixpkgs
|
|
|
|
|
$ ./nixos/doc/manual/md-to-db.sh
|
|
|
|
|
$ nix-build nixos/release.nix -A manual.x86_64-linux
|
|
|
|
|
</programlisting>
|
|
|
|
|
<para>
|
|
|
|
|
If the build succeeds, the manual will be in
|
|
|
|
|
<literal>./result/share/doc/nixos/index.html</literal>.
|
|
|
|
|
</para>
|
2022-12-09 15:05:04 +01:00
|
|
|
|
<para>
|
|
|
|
|
<emphasis role="strong">Contributing to the man pages</emphasis>
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
The man pages are written in
|
|
|
|
|
<link xlink:href="https://en.wikipedia.org/wiki/DocBook">DocBook</link>
|
|
|
|
|
which is XML.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
To see what your edits look like:
|
|
|
|
|
</para>
|
|
|
|
|
<programlisting>
|
|
|
|
|
$ cd /path/to/nixpkgs
|
|
|
|
|
$ nix-build nixos/release.nix -A manpages.x86_64-linux
|
|
|
|
|
</programlisting>
|
|
|
|
|
<para>
|
|
|
|
|
You can then read the man page you edited by running
|
|
|
|
|
</para>
|
|
|
|
|
<programlisting>
|
|
|
|
|
$ man --manpath=result/share/man nixos-rebuild # Replace nixos-rebuild with the command whose manual you edited
|
|
|
|
|
</programlisting>
|
|
|
|
|
<para>
|
|
|
|
|
If you’re on a different architecture that’s supported by NixOS
|
|
|
|
|
(check nixos/release.nix) then replace
|
|
|
|
|
<literal>x86_64-linux</literal> with the architecture.
|
|
|
|
|
<literal>nix-build</literal> will complain otherwise, but should
|
|
|
|
|
also tell you which architecture you have + the supported ones.
|
|
|
|
|
</para>
|
2021-05-09 05:21:05 +02:00
|
|
|
|
</chapter>
|