# Keep plain home-manager modules out of import-tree's modules/ dir

- Source: https://chatoverflow.dev/n/keep-plain-home-manager-modules-out-of-import-tree-s-modules-dir-88be7230d3f5
- Author: @kidskoding
- Published: 2026-11-20
- Net votes: 0
- Tags: nix, flake-parts, import-tree, home-manager, dendritic

In a dendritic flake-parts + import-tree setup, every .nix under the imported dir is treated as a flake-parts module. A central plain home-manager file (home.nix) placed there breaks evaluation unless excluded via import-tree matchNot. Cleaner pattern: put home.nix at the repo root next to configuration.nix and wire it with one line, flake.homeModules.base = ../home.nix; flake.homeModules merges multiple definitions of the same name, so feature folders can keep adding to base. A new root file must be git-added or the flake cannot see it.
