diff --git a/modules/misc/news/2026/01/2026-01-25_19-00-28.nix b/modules/misc/news/2026/01/2026-01-25_19-00-28.nix new file mode 100644 index 00000000..4d6bfc04 --- /dev/null +++ b/modules/misc/news/2026/01/2026-01-25_19-00-28.nix @@ -0,0 +1,21 @@ +{ config, ... }: +{ + time = "2026-01-25T18:00:28+00:00"; + condition = config.programs.neovim.enable; + message = '' + The neovim module now exposes programs.neovim.extraLuaPackages via init.lua instead of wrapper arguments. + This makes for a better out of the box experience, closer to what users can expect on other distributions, i.e., you + can now run any neovim derivatives (neovide, neovim-qt etc) without wrapping. + + If you used home-manager only to install plugins, the newly generated init.lua might conflict with yours. + You can ignore the generated init.lua with + `xdg.configFile."nvim/init.lua".enable = false` but `extraLuaPackages` will become ineffective. + You can still refer to its generated content via: + xdg.configFile."nvim/lua/hm-generated.lua".text = config.programs.neovim.initLua; + and in your manual init.lua `require'hm-generated'` + + For more details, see: + - https://github.com/nix-community/home-manager/pull/8586 + - https://github.com/nix-community/home-manager/pull/8606 and its linked comments for more details/solutions. + ''; +} diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index 85eafaa1..8af5fedf 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -7,7 +7,6 @@ let inherit (lib) - concatMapStringsSep literalExpression mkEnableOption mkIf @@ -428,20 +427,6 @@ in (lib.makeBinPath cfg.extraPackages) ]; - extraMakeWrapperLuaCArgs = optionals (resolvedExtraLuaPackages != [ ]) [ - "--suffix" - "LUA_CPATH" - ";" - (concatMapStringsSep ";" luaPackages.getLuaCPath resolvedExtraLuaPackages) - ]; - - extraMakeWrapperLuaArgs = optionals (resolvedExtraLuaPackages != [ ]) [ - "--suffix" - "LUA_PATH" - ";" - (concatMapStringsSep ";" luaPackages.getLuaPath resolvedExtraLuaPackages) - ]; - vimPackageInfo = neovimUtils.makeVimPackageInfo (map suppressNotVimlConfig pluginsNormalized); wrappedNeovim' = pkgs.wrapNeovimUnstable cfg.package { @@ -462,8 +447,7 @@ in extraPython3Packages = ps: (cfg.extraPython3Packages ps) ++ (lib.concatMap (f: f ps) vimPackageInfo.pluginPython3Packages); neovimRcContent = cfg.extraConfig; - wrapperArgs = - cfg.extraWrapperArgs ++ extraMakeWrapperArgs ++ extraMakeWrapperLuaCArgs ++ extraMakeWrapperLuaArgs; + wrapperArgs = cfg.extraWrapperArgs ++ extraMakeWrapperArgs; wrapRc = false; }; in