nixpkgs-suyu/nixos/doc/manual/contributing-to-this-manual.chapter.md
Silvan Mosberger 37ba768fb4
Merge pull request #241871 from mobusoperandi/doc-doc-syntax-chapter
doc syntax section into chapter, link from nixos manual
2023-08-10 16:11:25 +02:00

1.4 KiB

Contributing to this manual

The DocBook and CommonMark sources of the NixOS manual are in the nixos/doc/manual subdirectory of the Nixpkgs repository. This manual uses the Nixpkgs manual syntax.

You can quickly check your edits with the following:

$ 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.

Contributing to the man pages

The man pages are written in DocBook which is XML.

To see what your edits look like:

$ 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

$ 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.