From 90d1d81983086adcc4e90c4ddaacdd414d5f0b63 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 7 Mar 2023 10:44:29 +0000 Subject: [PATCH] flake: move 'lib' to 'flake/' --- flake.nix | 8 +++----- flake/lib.nix | 7 +++++++ 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 flake/lib.nix 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