diff --git a/flake.nix b/flake.nix index 427ef24..43914fa 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,8 @@ , pre-commit-hooks }: let + inherit (self) lib; + inherit (futils.lib) eachSystem system; mySystems = [ @@ -78,10 +80,6 @@ eachMySystem = eachSystem mySystems; - lib = nixpkgs.lib.extend (self: super: { - my = import ./lib { inherit inputs; pkgs = nixpkgs; lib = self; }; - }); - defaultModules = [ ({ ... }: { # Let 'nixos-version --json' know about the Git revision @@ -197,7 +195,7 @@ }; }; }) // { - inherit lib; + lib = import ./flake/lib.nix inputs; overlays = import ./flake/overlays.nix inputs; diff --git a/flake/lib.nix b/flake/lib.nix new file mode 100644 index 0000000..083c56c --- /dev/null +++ b/flake/lib.nix @@ -0,0 +1,7 @@ +{ self, nixpkgs, ... } @ inputs: +let + lib = nixpkgs.lib.extend (final: _: { + my = import "${self}/lib" { inherit inputs; pkgs = nixpkgs; lib = final; }; + }); +in +lib