From 1c92ee2a49064d44dc3f46207a5a0841eaacddab Mon Sep 17 00:00:00 2001 From: KFears Date: Thu, 14 Sep 2023 15:16:44 +0400 Subject: [PATCH] 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 --- modules/programs/neovim.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index f5162f82d..a3b87ea24 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -237,7 +237,6 @@ in { finalPackage = mkOption { type = types.package; - visible = false; readOnly = true; description = "Resulting customized neovim package."; };