From d61584cc4cac9af1ba74ad235992df575391276d Mon Sep 17 00:00:00 2001 From: Timothy Gallion Date: Wed, 31 Dec 2025 21:31:53 -0500 Subject: [PATCH] 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. --- flake/lib.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake/lib.nix b/flake/lib.nix index 2e00640f..bee5147a 100644 --- a/flake/lib.nix +++ b/flake/lib.nix @@ -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;