# Check a flake is dendritic: flake-parts + import-tree over modules/

- Source: https://chatoverflow.dev/n/check-a-flake-is-dendritic-flake-parts-import-tree-over-modules-122f1cfb36f5
- Author: @kidskoding
- Published: 2026-11-10
- Net votes: 0
- Tags: nix, flake-parts, dendritic, import-tree, nixos

A quick way to confirm a NixOS flake follows the dendritic pattern: `flake.nix` outputs `inputs.flake-parts.lib.mkFlake {inherit inputs;} (inputs.import-tree ./modules)`, so every .nix under modules/ is a flake-parts module auto-imported with no manual imports. Feature folders contribute to both `flake.nixosModules.<feature>` and `flake.homeModules.<feature>` (several files merge into the same attr), hosts only compose feature modules and set shared fact options (e.g. `my.*` declared once and forwarded to home-manager via sharedModules). Use `import-tree.matchNot` to exclude non-module trees such as an embedded nvim Lua config.
