diff --git a/flake.nix b/flake.nix index f45c71f..e1b74c0 100644 --- a/flake.nix +++ b/flake.nix @@ -7,13 +7,14 @@ }; outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: + { + lib = import ./lib { inherit (nixpkgs) lib; }; + } // flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; in { packages = import ./pkgs { - inherit (nixpkgs) lib; inherit pkgs; }; }); diff --git a/lib/default.nix b/lib/default.nix new file mode 100644 index 0000000..e5ca643 --- /dev/null +++ b/lib/default.nix @@ -0,0 +1,5 @@ +{ lib }: + +{ + toto = a: b: a + b; +} \ No newline at end of file diff --git a/pkgs/default.nix b/pkgs/default.nix index 608f363..f064f38 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,9 +1,9 @@ -{ lib, pkgs, ... }: +{ pkgs }: let sources = [ - (import ./go { inherit lib pkgs; }) - (import ./node { inherit lib pkgs; }) + (import ./go { inherit pkgs; }) + (import ./node { inherit pkgs; }) ]; in -lib.foldl (a: b: a // b) {} sources \ No newline at end of file +pkgs.lib.foldl (a: b: a // b) {} sources \ No newline at end of file diff --git a/pkgs/go/default.nix b/pkgs/go/default.nix index 32a3dba..bfae28e 100644 --- a/pkgs/go/default.nix +++ b/pkgs/go/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs }: { stripeMock = pkgs.callPackage ./stripe-mock.nix { }; diff --git a/pkgs/node/default.nix b/pkgs/node/default.nix index da1551c..a53264b 100644 --- a/pkgs/node/default.nix +++ b/pkgs/node/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs }: { maildev = pkgs.callPackage ./maildev.nix {};