pkgs Overlay
The root pkgs/ directory defines local packages and exposes them through one generated overlay.
Up: NixOS Flakes Dendritic System Setup
Down: cells overlays | root overlays
What this node does
pkgs/default.nix reads package subdirectories and turns each one into an attribute by calling it with final.callPackage.
{
overlay = final: _prev:
let
dirContents = builtins.readDir ../pkgs;
genPackage = name: {
inherit name;
value = final.callPackage (../pkgs + "/${name}") { };
};
in
builtins.listToAttrs (map genPackage (builtins.attrNames dirContents));
}Why it is set up this way
Adding a package becomes a filesystem operation: add a package directory under pkgs/, and the overlay exposes it automatically. That matches the dendritic pattern because new leaves can appear without editing one central registry file.
Caution
Auto-discovery is convenient, but it assumes every entry under pkgs/ is a package directory. Keep non-package docs or scratch files out of that directory.