Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions wrappers/_shared.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down