flake: move 'lib' to 'flake/'

This commit is contained in:
Bruno BELANYI 2023-03-07 10:44:29 +00:00
parent 819ce1a320
commit 90d1d81983
2 changed files with 10 additions and 5 deletions

View File

@ -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;

7
flake/lib.nix Normal file
View File

@ -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