flake/lib.nix: Use the pinned nixpkgs in from the flake for lib
Currently the lib that is propogated to nixvim modules comes from the `nixpkgs-lib` input from the `flake-parts` flake. This works fine locally because the `nixpkgs-lib` follows `nixpkgs` however downstream repos cannot cannot make `nixvim` follow their own version of `flake-parts` without also overriding `nixpkgs-lib`. * Clearer path for where lib passed to modules is coming from * Allow downstream repos more flexibility in follows Pull lib from the pinned `nixpkgs` input.
This commit is contained in:
parent
df9d3637e8
commit
d61584cc4c
1 changed files with 4 additions and 1 deletions
|
|
@ -3,13 +3,16 @@
|
|||
config,
|
||||
lib,
|
||||
withSystem,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Public `lib` flake output
|
||||
flake.lib = {
|
||||
nixvim = lib.makeOverridable ({ lib }: (lib.extend self.lib.overlay).nixvim) {
|
||||
inherit lib;
|
||||
# NOTE: Use the lib from nixpkgs pin to prevent a dependency
|
||||
# on pinning the flake-parts nixpkgs-lib to the nixpkgs pin
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
};
|
||||
overlay = import ../lib/overlay.nix {
|
||||
flake = self;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue