This repo now uses a dendritic flake shape centered on passive registries and data-driven assembly.
flake.nixis intentionally tiny and only routes intoflake-partsmodules/flake-parts/is gluelib/owns normalization, registry discovery, assembly, and validationinventory/is the data model for hosts, users, roles, networks, and related site datadendrites/holds reusable NixOS capability brancheshomes/holds reusable Home Manager branchesfruits/holds deployable long-running outcomeshosts/holds host-specific override modules
The flake is assembled from names in inventory, not from a root file that manually lists every host and module.
flake.nixcallsflake-partswithimport-tree ./modulesmodules/flake-parts/registries.nixpublishes passive registries for:dendrites/fruits/homes/hosts/
modules/flake-parts/configurations.niximportsinventory/inventory.nixlib/inventory.nixnormalizes host and user datalib/validation.nixvalidates inventory and host compositionlib/assembly.nixturns the normalized inventory into:flake.nixosConfigurationsflake.homeConfigurations
modules/flake-parts/deployments.nixturns that same inventory plus the built NixOS configurations into:
flake.colmenaflake.colmenaHiveflake.deploy
inventory/Declarative data. Hosts, users, roles, networks, storage, ports, and similar facts.lib/Inert helpers. Registry discovery, assembly, normalization, endpoints, validation, and user-module publishing.modules/flake-parts/Root glue only. Outputs, registries, checks, and flake-parts wiring.dendrites/Reusable capability branches such asbase,desktop,media,storage, andsystem.fruits/Named deployable outcomes such asfossilsafe.homes/Shared Home Manager branches plus per-user home entrypoints.hosts/Host-specific override modules such ashosts/r640-0/r640-0.nix.checks/Repository checks such aschecks/no-default-nix.nix.experiments/Prototype and unstable work that should stay outside the primary flake.
The repo currently uses explicit nested dendrite discovery:
- top-level dendrites live at
dendrites/<name>/<name>.nix - child dendrites live under branch-owned directories such as
dendrites/<parent>/dendrites/<child>/<child>.nix - deeper child families can keep growing beneath a discovered child branch, for
example
dendrites/system/dendrites/workstation/gaming/gaming.nix - dendrite entrypoints import their own leaves explicitly
- helper files are inert until referenced
Examples:
dendrites/base/base.nixdendrites/desktop/dendrites/gnome/gnome.nixdendrites/system/dendrites/workstation/gaming/gaming.nixdendrites/storage/dendrites/zfs/zfs.nix
This keeps registry discovery convention-based while still allowing a branch to grow deeper specializations without making helper files active by accident.
- A leaf is a small focused behavior module imported by a branch entrypoint.
- A fruit is a deployable persistent outcome that may depend on dendrites.
- Dendrites and fruits currently require
meta.nix.
Metadata is used for:
- capability description
- dependency resolution
- conflict checks
- host-class validation
- documentation and future introspection
Metadata does not replace the actual module body.
Hosts are allowed to be data-heavy, but they should stay behavior-light.
The current host schema separates:
- identity:
exported,system - selection:
roles,networks,dendrites,fruits,users - network risk posture:
publicYggdrasil - machine facts:
facts.* - consumed policy:
org.* - hardware imports:
hardwareModules - host escape hatches:
overrides
Examples in the current inventory:
r640-0selectsstorage/zfsand providesfacts.storage.zfs.*desktoptoodleselectssystem/workstation/gamingfor Steam, selectsstorage/tape, attaches thefossilsafefruit, and carries tape device facts plusorg.storage.tape.*settings
The active flake already validates several architectural rules:
- no unknown users or roles in inventory
- no duplicate claimed ports
- no invalid tape managers
- no conflicting dendrites in a resolved host composition
- required facts for
storage/zfs - required tape devices for
storage/tape - required fruit attachment for FossilSafe-backed tape setups
- private Yggdrasil nodes and peer references in
inventory/networks.nix - explicit network-to-dendrite declarations in
inventory/networks.nix - exported deployment targets for generated Colmena and deploy-rs surfaces
The repo now also assembles a private overlay and deploy surfaces from the same inventory:
inventory/networks.nixdefines the private Yggdrasil topology- hosts opt into named networks through
inventory/hosts.nix network/yggdrasil-privatematerializes Yggdrasil settings, overlay aliases, and firewall policy from inventorynetwork/tailscaleis attached through explicit host network membership on hosts that need cross-network bridge reachabilitylib/deployments.nixgenerates Colmena and deploy-rs targets from exported hosts plus deployment hints inorg.deployment
For operator-facing details, see
docs/private-overlay-and-deployments.md.
Some older docs still described the previous modules/dendrites,
modules/home, and modules/hosts architecture. That is no longer the active
shape.
The future direction of exposing more composition directly from root flake.nix
may still be interesting, but the code today is truthfully:
- tiny
flake.nix flake-partsglue undermodules/- passive registries from
dendrites/,fruits/,homes/, andhosts/
For a plainer walkthrough, see
docs/dendritic-guide.md. For
authoring steps, see
docs/authoring-guide.md.