1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-12 09:43:39 +02: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 Robert Helgesson
parent a88df2fb10
commit dd88dbc694
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89

View File

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