Skip to main content

System architecture

The platform is two planes joined by Git: a control plane of repositories (GitHub as the source of truth) and a runtime plane (Nix fleet + RKE2 cluster + Cloudflare edge). Nothing reaches production except through a commit.

Layer model​

LayerTechnologySource of truth
Hardware11 hosts, 3 archesHardware fleet
Host configNixOS / nix-darwin + sops-nixNix fleet
KubernetesRKE2 via knix, Flux GitOpsKubernetes
IngressEnvoy Gateway + TailscaleGateway & DNS
EdgeCloudflare WorkersWeb properties
AutomationHermes + skills + actionsAutomation

The Git-to-production paths​

Three distinct reconcile loops, all commit-driven:

  1. Hosts (comin): commit to machines → comin on each host pulls its branch → new closure builds (Cachix-served) → activation. No SSH-driven mutation; drift self-heals on the next pull.
  2. Cluster (Flux): commit to manifests → flux-operator detects → kustomize-controller builds the overlay → helm-controller / kustomize-controller apply → cluster state converges.
  3. Edge (Workers Builds): merge to websites main → Cloudflare path-filtered build per app → wrangler deploy. Verified only by the log's Uploaded/Deployed lines.

Agents as first-class operators​

Every Nix host runs a hermes-agent service; the KubeVirt VM automata is the A2A hub. Agents hold the same tools as humans (gh, jj, kubectl read-only probes) and the same constraints: they push branches, open PRs, and land only through the protected-main gates — the Landing protections ruleset blocks self-approval even for agents. The capability split is encoded in the tailnet ACL: machines talk to the cluster API plane, the hub relays workstation traffic, and nothing crosses planes without a tag.

Failure domains​

  • Per-app gateways — one Envoy data-plane deployment per exposed service; a bad deploy affects exactly one app's ingress.
  • Control-plane quorum — manash/ashira/nalsha hold etcd; RKE2 server loss beyond one node freezes control-plane writes (workers keep serving).
  • Stateful storage — Longhorn replicates within the cluster; PVCs are sized minimally because volumes cannot shrink once bound.
  • Secrets — sops-encrypted at rest in Git; decrypted only at activation/reconcile time on the target host.