Apropos: Difference between revisions

QuBe (talk | contribs)
Update syntax to match https://github.com/NixOS/nixpkgs/pull/488395, Reorder sections so that "nix-way" is first, Warn automatic way is not home-manager compatible, Note option is set by fish
Tags: Mobile edit Mobile web edit
QuBe (talk | contribs)
Add home-manager section
Tags: Mobile edit Mobile web edit
 
Line 13: Line 13:
}
}
</syntaxhighlight>
</syntaxhighlight>
This will create an immutable cache in sync with <code>environment.systemPackages</code>. Note that it will not be populated with programs from home-manager. Since it is immutable, the <code>mandb</code> command (see below) will fail.
This will create an immutable cache in sync with <code>environment.systemPackages</code>. Since it is immutable, the <code>mandb</code> command (see below) will fail.


Some programs might set this option to true by default. For example, this is the case of [[fish]], which uses it to automatically create completions (see [fish_update_completions](https://fishshell.com/docs/current/cmds/fish_update_completions.html)).
If you are using home-manager, the above will not populate the cache with the programs installed that way, instead add this to your <code>home.nix</code>:
<syntaxhighlight lang="nix">
{
  programs.man.generateCaches = true;
}
</syntaxhighlight>
 
Some programs might set one of these options to true by default, in that case you might still need to set the other to true manually. An example of such a program is [[fish]], which uses it to automatically create completions (see [fish_update_completions](https://fishshell.com/docs/current/cmds/fish_update_completions.html)).


To generate it manually, run:
To generate it manually, run: