mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
83b917a960
When running nixos-rebuild -I, the man page just said "-I path" which could be interpreted as "just a path to nixpkgs", which in fact it actually has the same meaning as NIX_PATH. This is now made clear in the manual, so that when grepping "-I" and "NIX_PATH" one quickly finds the format of the option. I don't know how to link to the "nix manual" as stated in the docbook, so I left that as it is. Additionally, it wasn't clear to me how to actually build the man pages and view the changes I made. That's now in the contributing-to-this-manual.chapter.md.
1.2 KiB
1.2 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.
You can quickly check your edits with the following:
$ cd /path/to/nixpkgs
$ ./nixos/doc/manual/md-to-db.sh
$ 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
.
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.