diff --git a/flake.nix b/flake.nix index d7c2de4c8..f34fe4be2 100644 --- a/flake.nix +++ b/flake.nix @@ -64,7 +64,7 @@ inherit (pkgs) lib; }); - overlay = import ./pkgs; + overlay = import ./pkgs { inherit nixos; }; lib = import ./lib { inherit nixos pkgs; }; diff --git a/lib/README.md b/lib/README.md index ed19b1a3d..89db94539 100644 --- a/lib/README.md +++ b/lib/README.md @@ -82,6 +82,15 @@ lib/default.nix: } ``` +You can then access this library function via `pkgs.myLib`: + +```nix +{ pkgs, ... }: + +pkgs.myLib.mkCustomI3BindSym { "..." }; + +``` + [nixpkgs-lib]: https://github.com/NixOS/nixpkgs/tree/master/lib [nixpkgs-pkgs-lib]: https://github.com/NixOS/nixpkgs/tree/master/pkgs/pkgs-lib [nixpkgs-pkgs-build-support]: https://github.com/NixOS/nixpkgs/tree/master/pkgs/build-support diff --git a/pkgs/default.nix b/pkgs/default.nix index ce1687071..fc6bc33bb 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1 +1,3 @@ -final: prev: { } +{ nixos }: final: prev: { + myLib = import ../lib { inherit nixos; pkgs = final; }; +}