nix-dendritic-flake
Installation
SKILL.md
Dendritic Flake Conversion
Expert guidance for converting Nix flakes to the dendritic pattern with flake-parts - where every Nix file except entry points is a top-level module.
What is the Dendritic Pattern?
The dendritic pattern uses a top-level configuration - commonly flake-parts, though it does not have to be (lib.evalModules directly also works) - where:
- Every Nix file is a module of the top-level configuration, except entry-point files such as
flake.nixanddefault.nix - Each file implements a single feature across all configurations it applies to
- File paths name features, not types or configuration classes
- Lower-level configs (NixOS, home-manager, nix-darwin) are stored as option values using
deferredModuletype
Key benefit: Files can share values via top-level config, eliminating specialArgs pass-through patterns.
Evaluation cost depends on the configuration; measure representative hosts before making performance claims. Use the tiered validation in the Migration Checklist while iterating.
Anti-patterns
Mirrors the upstream project's guidance - keep these in mind when writing modules: