πŸ—οΈArchitecture

  • The homelab is four layers, each managed as code in the infra repo, each with its own apply mechanism. Most day-to-day work happens in one layer at a time.

  • The four layers

    • Layer 1 β€” Bare metal (Architecture/NixOS)

      • NixOS configuration under nix/ for every host. Declared in flake.nix, deployed with nixos-rebuild, self-healing via auto-upgrades that track main.

    • Layer 2 β€” Kubernetes (Architecture/Kubernetes)

      • Two fully capable clusters under clusters/: folly on-site and offsite at the remote site, with clusters/base/ shared between them. FluxCD reconciles every manifest on merge. ArgoCD is installed as a Flux HelmRelease and currently owns no applications.

    • Layer 3 β€” Cloud and network (Architecture/Terraform)

      • OpenTofu root modules under terraform/, covering the network fabric and the cloud and identity estate. Applies run through Atlantis on the PR.

    • Layer 4 β€” Applications (Architecture/Applications)

      • First-party code: deployable services in apps/, reusable packages and Helm charts in packages/, base and tool OCI images in images/.

  • Cross-cutting

  • Design principles

    • GitOps-first. Desired state lives in git; the operators β€” Atlantis, Flux, and NixOS auto-upgrade β€” apply it. Mutating live infrastructure by hand is a bug, and out-of-band changes get reverted by the machinery itself.

    • Network facts have one source. Cluster IPs, CIDRs, ASNs, and API endpoints live in the per-cluster cluster-topology ConfigMaps, read by Flux, Nix, and OpenTofu alike. A conftest contract enforces the schema in CI.

    • Point, don't restate. Documentation names the directory and lets the tree answer. A list written in prose is a list that goes stale.

Sub-pages

Linked references 3

Architecture/Kubernetes

Layer 2 of Architecture: two Kubernetes clusters under clusters/, reconciled by FluxCD on every merge to main. The Terraform bootstrap roots own CoreDNS and Flux itself; Flux owns post-bootstrap cluster state. ArgoCD is installed as a Flux HelmRelease and owns no applications; terraform/argo/ wires the provider and declares no resources. Reconciliation mechanics and the apply model live on Architecture/GitOps.

Home

Architecture β€” the four layers and how they fit together

2026-07-08

Seeded Architecture (all four layers plus networking, secrets, and GitOps), Fleet, and Runbooks.