diff --git a/wrappers/_shared.nix b/wrappers/_shared.nix index 77874b52..78d41498 100644 --- a/wrappers/_shared.nix +++ b/wrappers/_shared.nix @@ -70,10 +70,16 @@ in config = mkMerge [ { - # Make our lib available to the host modules - # - the `config.lib.nixvim` option is the nixvim-lib - # - the `nixvimLib` arg is `lib` extended with our overlay - lib.nixvim = lib.mkDefault config._module.args.nixvimLib.nixvim; + # Make Nixvim's extended lib available to the host modules + # - The `config.lib.nixvim` option is Nixvim's section of the lib + # (based on our flake's locked Nixpkgs lib) + # - The `nixvimLib` arg is `lib` extended with our overlay + # (based on the host configuration's `lib`) + # + # NOTE: It is important that we use the flake-locked Nixpkgs lib, + # so that we can safely use recently added lib features. + # TODO: Consider deprecating `_module.args.nixvimLib`? + lib.nixvim = lib.mkDefault self.lib.nixvim; _module.args.nixvimLib = lib.mkDefault (lib.extend self.lib.overlay); }