Personal Nix flake for two machines:
tahani- x86_64 Linux home server / workstationjanet- aarch64 Darwin personal laptop
modules/- flake-parts modules, auto-imported viaimport-treemodules/hosts/- per-host composition modulesmodules/hosts/_parts/- host-private leaf modules like hardware, disks, and literal networkingmodules/profiles/- shared host and user profile bundlesmodules/_lib/- local helper functionsmodules/_desktop/,modules/_opencode/,modules/_terminal/,modules/_tmux/- feature-owned config data, templates, and rendered config sourcesapps/- shell apps exposed through the flakesecrets/- SOPS-encrypted secretsflake.nix- generated flake entrypointmodules/dendritic.nix- source of truth for flake inputs andflake.nixgeneration
This repo uses den and organizes configuration around aspects instead of putting everything directly in host files.
- shared behavior lives in
den.aspects.<name>.<class>modules undermodules/*.nix - the machine inventory lives in
modules/inventory.nix - shared bundles live in
modules/profiles/{host,user}/ - host composition happens in
modules/hosts/<host>.nix - host-private imports live in
modules/hosts/_parts/<host>/and stay limited to true machine leaf files - feature-owned services and user config live in top-level modules like
modules/ai-tools.nixandmodules/network.nix - large app config payloads live next to their feature under
_-prefixed directories and get rendered from Nix data instead of mixing inline JSON/text blobs and checked-in generated files - user-level config mostly lives in Home Manager aspects
Common examples:
modules/core.nix- shared Nix and shell foundationmodules/dev-tools.nix- VCS, language, and developer toolingmodules/network.nix- SSH and tailscale aspectsmodules/ai-tools.nix- OpenCode, MCP, and agent configurationmodules/profiles/user/workstation.nix- shared developer workstation user bundlemodules/hosts/tahani.nix- server/workstation composition fortahani
nix run .#build
nix run .#build -- tahani
nix run .#apply
nix flake check
alejandra .flake.nix is generated. Update inputs in modules/dendritic.nix, then regenerate:
nix run .#write-flake
alejandra .