diff options
author | Doron Behar <doron.behar@gmail.com> | 2023-08-12 18:47:43 +0300 |
---|---|---|
committer | Doron Behar <doron.behar@gmail.com> | 2023-08-12 22:28:04 +0300 |
commit | 924a07dc227b69b53e3f43d2d08996d33b364c92 (patch) | |
tree | 1853c29969013ac1ceff55a3bf5626f4a782bf25 /nixos/modules/installer | |
parent | 32f75a0f2af55b50061629fd4e51221f15ada457 (diff) | |
download | nixlib-924a07dc227b69b53e3f43d2d08996d33b364c92.tar nixlib-924a07dc227b69b53e3f43d2d08996d33b364c92.tar.gz nixlib-924a07dc227b69b53e3f43d2d08996d33b364c92.tar.bz2 nixlib-924a07dc227b69b53e3f43d2d08996d33b364c92.tar.lz nixlib-924a07dc227b69b53e3f43d2d08996d33b364c92.tar.xz nixlib-924a07dc227b69b53e3f43d2d08996d33b364c92.tar.zst nixlib-924a07dc227b69b53e3f43d2d08996d33b364c92.zip |
nixos/doc: Improve documentation of documentation
- Move contents of README.md from nixos/modules/installer/tools/manpages/ to nixos/doc/manual/contributing-to-this-manual.chapter.md. - Don't mention DocBook as its obsolete and too specific. - Rename derivation attribute name of configuration.nix(5) manual page, both on the `contributing-to-this-manual.chapter.md`, and in other places.
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r-- | nixos/modules/installer/tools/manpages/README.md | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/nixos/modules/installer/tools/manpages/README.md b/nixos/modules/installer/tools/manpages/README.md deleted file mode 100644 index 05cb83902c74..000000000000 --- a/nixos/modules/installer/tools/manpages/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# NixOS manpages - -This is the collection of NixOS manpages, excluding `configuration.nix(5)`. - -Man pages are written in [`mdoc(7)` format](https://mandoc.bsd.lv/man/mdoc.7.html) and should be portable between mandoc and groff for rendering (though minor differences may occur, mandoc and groff seem to have slightly different spacing rules.) - -For previewing edited files, you can just run `man -l path/to/file.8` and you will see it rendered. - -Being written in `mdoc` these manpages use semantic markup. This file provides a guideline on where to apply which of the semantic elements of `mdoc`. - -### Command lines and arguments - -In any manpage, commands, flags and arguments to the *current* executable should be marked according to their semantics. Commands, flags and arguments passed to *other* executables should not be marked like this and should instead be considered as code examples and marked with `Ql`. - - - Use `Fl` to mark flag arguments, `Ar` for their arguments. - - Repeating arguments should be marked by adding ellipses (`...`). - - Use `Cm` to mark literal string arguments, e.g. the `boot` command argument passed to `nixos-rebuild`. - - Optional flags or arguments should be marked with `Op`. This includes optional repeating arguments. - - Required flags or arguments should not be marked. - - Mutually exclusive groups of arguments should be enclosed in curly brackets, preferably created with `Bro`/`Brc` blocks. - -When an argument is used in an example it should be marked up with `Ar` again to differentiate it from a constant. For example, a command with a `--host name` flag that calls ssh to retrieve the host's local time would signify this thusly: -``` -This will run -.Ic ssh Ar name Ic time -to retrieve the remote time. -``` - -### Paths, NixOS options, environment variables - -Constant paths should be marked with `Pa`, NixOS options with `Va`, and environment variables with `Ev`. - -Generated paths, e.g. `result/bin/run-hostname-vm` (where `hostname` is a variable or arguments) should be marked as `Ql` inline literals with their variable components marked appropriately. - - - Taking `hostname` from an argument become `.Ql result/bin/run- Ns Ar hostname Ns -vm` - - Taking `hostname` from a variable otherwise defined becomes `.Ql result/bin/run- Ns Va hostname Ns -vm` - -### Code examples and other commands - -In free text names and complete invocations of other commands (e.g. `ssh` or `tar -xvf src.tar`) should be marked with `Ic`, fragments of command lines should be marked with `Ql`. - -Larger code blocks or those that cannot be shown inline should use indented literal display block markup for their contents, i.e. -``` -.Bd -literal -offset indent -... -.Ed -``` -Contents of code blocks may be marked up further, e.g. if they refer to arguments that will be substituted into them: -``` -.Bd -literal -offset indent -{ - options.hostname = "\c -.Ar hostname Ns \c -"; -} -.Ed -``` |