diff options
| author | Franck Cuny <franck@fcuny.net> | 2025-04-24 20:11:15 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2025-04-24 20:11:15 -0700 |
| commit | b21a57caf83a3deacb99e8d47a508082013304da (patch) | |
| tree | 2df35f7d3e0c5310489101ffbab38c1e1ccfc07d /flake.nix | |
| parent | drop just (diff) | |
| download | infra-b21a57caf83a3deacb99e8d47a508082013304da.tar.gz | |
automatically add packages to the overlays
Store custom packages under `customPackages` to make it easier to
distinct them from the rest of the packages.
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -45,17 +45,18 @@ # Define overlays here overlays = [ (final: _prev: { - sapi = final.callPackage ./pkgs/sapi { }; - hashi = final.callPackage ./pkgs/hashi { }; - llmPython = final.callPackage ./pkgs/llmPython { - inherit pkgsUnstable; - }; + # Load all packages from the pkgs directory + customPackages = builtins.mapAttrs ( + name: _: + final.callPackage (./pkgs + "/${name}") { + inherit pkgsUnstable; + } + ) (builtins.readDir ./pkgs); }) ]; mkSystem = import ./nix/lib/mkSystem.nix { - inherit nixpkgs nixpkgsUnstable inputs; - inherit overlays; + inherit nixpkgs inputs overlays; }; treefmtEval = treefmt-nix.lib.evalModule pkgs { |
