Commit Graph

11 Commits

Author SHA1 Message Date
aleksana
b60f6b118b nixos/mandoc: add leading slash to manPath 2024-03-20 00:56:18 +01:00
aleksana
da089cf63a nixos/mandoc: fix invalid manpath directory and add cachePath option 2024-03-20 00:56:18 +01:00
sternenseemann
4cf470c97c nixos/mandoc: don't create leading double slashes in MANPATH 2023-12-24 18:44:36 +01:00
aleksana
ad235e5072 nixos/mandoc: add man.conf settings option 2023-12-24 18:44:36 +01:00
aleksana
4f3e29f3a3 nixos/mandoc: use MANPATH environment variable 2023-12-24 18:44:36 +01:00
aleksana
ab222895b1 nixos/mandoc: fix paths don't exist failure 2023-12-24 18:44:36 +01:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
pennae
4f91838584 nixos/misc: invariant option docs MD conversions 2022-07-24 13:01:18 +02:00
Klemens Nanni
199933efdf nixos/mandoc: Leave shell argument quoting to nix
Manually crafting a quoted string that otherwise lacks any safe-guards
looks odd.

Use `escapeShellArg` instead before prepending the path.
2022-05-09 10:48:54 +02:00
sternenseemann
adfbfc0397 nixos/mandoc: add package option 2021-12-31 11:17:34 +01:00
sternenseemann
f4f7238860 nixos/mandoc: init
Adds a NixOS module which allows using mandoc as the main manual
viewer. It can be used as a drop-in replacement for documentation.man
which relies on GNU's man-db and provides more or less the same
features.

The generateCaches option requires a different implementation for
mandoc, so it is hard to share code between the two modules -- hence it
has been implemented separately. Using both at the same time makes
little sense and wouldn't quite work, so there's an assertion to
prevent it.

To make makewhatis(8) index manual pages which are symlinks to the nix
store, we need to set READ_ALLOWED_PATH to include
`builtins.storeDir`. For background and discussion see:
https://inbox.vuxu.org/mandoc-tech/c9932669-e9d4-1454-8708-7c8e36967e8e@systemli.org/T/
2021-12-31 11:17:34 +01:00