1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-25 19:29:47 +01:00

neovim: expose finalPackage

Make the `finalPackage` option public, but still read-only. The final
package option is quite useful for users.

For example, to integrate `lazy.nvim` with Nix there are three things
that must be done:

1. `lazy.nvim` resets packpath, which should be managed by Nix; it has
   to be turned off with `performance.reset_packpath = false` option in
   `lazy.nvim`

2. Same thing applies to rtp, the relevant option is
   `performance.rtp.reset = false`

3. `dev.path` must be specified as the folder that contains the plugins.
   This folder is the path to Nix store path with Neovim plugins, and
   the plugins that are managed by Nix must be marked as `dev = true`

The third condition can not be fulfilled without this PR, as the final
package that Home Manager produces is not exposed, therefore it is
impossible to extract the Nix store path. This PR makes it more
accessible via

    ${
      pkgs.vimUtils.packDir config.programs.neovim.finalPackage.passthru.packpathDirs
    }/pack/myNeovimPackages/start
This commit is contained in:
KFears 2023-09-14 15:16:44 +04:00 committed by Mikilio
parent 72202495ae
commit 1c92ee2a49
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -237,7 +237,6 @@ in {
finalPackage = mkOption {
type = types.package;
visible = false;
readOnly = true;
description = "Resulting customized neovim package.";
};