Apropos: Difference between revisions

imported>Ncfavier
document documentation.man.generateCaches
imported>Ncfavier
Restore instructions for generating the cache manually
Line 1: Line 1:
By default as of NixOS 21.05, <code>apropos</code>, <code>whatis</code> and <code>man -k</code> do not find anything when run. To enable automatically building the man page index caches, you can set:
By default as of NixOS 21.05, <code>apropos</code>, <code>whatis</code> and <code>man -k</code> do not find anything when run, because the man page index cache is not generated.


To generate it manually (and again to update it when new software is installed), run:
<syntaxhighlight lang=bash>
sudo mkdir -p /var/cache/man/nixos
sudo mandb
</syntaxhighlight>
To enable automatically building the immutable cache, you can set:
<syntaxhighlight lang=nix>
<syntaxhighlight lang=nix>
documentation.man.generateCaches = true;
documentation.man.generateCaches = true;
</syntaxhighlight>
</syntaxhighlight>
Note that this will rebuild the cache every time you change anything in <code>environment.systemPackages</code>, and will make the <code>mandb</code> command fail.