import-treeand vic's dendritic libs made for you with Love++ and AI--. If you like my work, consider sponsoring
Recursively import Nix modules from a directory, with a simple, extensible API.
{
inputs.import-tree.url = "github:vic/import-tree";
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; }
(inputs.import-tree ./modules);
}By default, paths having /_ are ignored.
🌳 Works with NixOS, nix-darwin, home-manager, flake-parts, NixVim, etc.
🌲 Callable as a deps-free Flake or nix lib.
🌴 Sensible defaults and configurable behaviour.
🌵 Chain .filter, .match, .map for precise file selection.
🎄 Extensible: .addAPI to create domain-specific instances.
🌿 Built for the Dendritic Pattern.
🌱 Growing community adoption
📖 Full documentation — guides, API reference, and examples.
import-tree uses checkmate for testing:
nix flake check github:vic/checkmate --override-input target path:.