feat: migrate to dendritic pattern with flake-parts #1

Merged
bryan merged 21 commits from dendritic-migration into main 2026-01-28 15:37:29 +00:00
Owner

Summary

Migrates nix-configs from host-centric to feature-centric (dendritic) architecture using flake-parts.

Changes

  • flake.nix now uses flake-parts.lib.mkFlake with import-tree auto-importing
  • All configurations organized by feature instead of by host
  • Darwin + NixOS aspects coexist in same module files
  • Cursor package references removed (dead code cleanup)

New Structure

modules/
├── base/ (fonts, nix-settings, zsh, homebrew)
├── dev/ (editors, git, cli-tools)
├── services/ (ollama, open-webui, monitoring, smb-mount)
├── desktop/ (gnome, gaming, audio)
├── hosts/ (mbp, a6mbp, studio, gnarbox)
└── dev-envs/ (vets-website, vets-api, etc.)

Verification

  • All 4 hosts build
  • All 5 dev-envs work
  • nix flake check passes

Tag: v2.0.0-dendritic

## Summary Migrates nix-configs from host-centric to feature-centric (dendritic) architecture using flake-parts. ### Changes - flake.nix now uses flake-parts.lib.mkFlake with import-tree auto-importing - All configurations organized by feature instead of by host - Darwin + NixOS aspects coexist in same module files - Cursor package references removed (dead code cleanup) ### New Structure modules/ ├── base/ (fonts, nix-settings, zsh, homebrew) ├── dev/ (editors, git, cli-tools) ├── services/ (ollama, open-webui, monitoring, smb-mount) ├── desktop/ (gnome, gaming, audio) ├── hosts/ (mbp, a6mbp, studio, gnarbox) └── dev-envs/ (vets-website, vets-api, etc.) ### Verification - ✅ All 4 hosts build - ✅ All 5 dev-envs work - ✅ nix flake check passes - Tag: v2.0.0-dendritic
Removes all cursor package references from the codebase:
- Remove cursor overlay from mkPkgs in flake.nix
- Remove packages.x86_64-linux.cursor export from flake.nix
- Remove cursor overlay from nixosConfigurations in flake.nix
- Remove cursor from homebrew.casks in hosts/a6mbp.nix
- Remove cursor references from README.md
- Delete pkgs/cursor/ directory (dead code with no default.nix)

All builds verified:
- nix flake check: PASS
- darwin-rebuild build --flake '.#mbp': PASS
- darwin-rebuild build --flake '.#a6mbp': PASS
- darwin-rebuild build --flake '.#studio': PASS
- nix build '.#nixosConfigurations.gnarbox.config.system.build.toplevel' --dry-run: PASS
- grep -r 'cursor' --include='*.nix' .: No matches
Create host configuration modules that import feature modules:
- mbp.nix: Personal MacBook with personal apps (Bambu Studio, Steam, etc.)
- a6mbp.nix: Work MacBook with work tools (AWS, Docker, DDEV, Slack, etc.)
- studio.nix: Media server with services (ollama, open-webui, monitoring, smb-mount)
- gnarbox.nix: NixOS desktop with desktop features (gnome, gaming, audio)

Each host module follows the flake-parts pattern with flake.modules.darwin/nixos.<hostname>.
Original hosts/ files remain unchanged for Task 12 cleanup.
Migrate all VA development environments to flake-parts perSystem pattern:
- Copy lib.nix (shared utilities) to modules/dev-envs/
- Wrap vets-website, vets-api, next-build, component-library, content-build
- Each module exports devShells.<name> via perSystem
- All modules validated with nix-instantiate --parse
- Restructure flake.nix to use flake-parts.lib.mkFlake
- Add import-tree to auto-import modules from modules/
- Add modules/_options.nix to declare flake.modules option for merging
- Remove duplicate modules/darwin/services/ (already in modules/services/)
- Rename dev-envs/lib.nix to _lib.nix to exclude from import-tree

All darwin hosts (mbp, a6mbp, studio) and dev shells build successfully.
Author
Owner

Tested on a6mbp successfully

Tested on a6mbp successfully
Author
Owner

Tested on gnarbox successfully

Tested on gnarbox successfully
import-tree auto-imports all .nix files, but hardware-configs use
modulesPath which only exists in NixOS module context, not flake-parts.
bryan force-pushed dendritic-migration from 7633baaa3b to 3644ed3e23 2026-01-28 00:10:05 +00:00 Compare
- Update README.md with flake-parts + import-tree architecture
- Add studio host documentation (media server with ollama, monitoring)
- Rename Claude Code references to OpenCode throughout
- Add content-build to dev environments list
- Update modules/README.md with accurate file names
- Remove outdated migration status (migration complete)
bryan merged commit 1954bb9604 into main 2026-01-28 15:37:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bryan/nix-configs!1
No description provided.