The homelab
Five servers, a laptop and a workstation, all described in one Nix flake. This is the part of the site that makes the rest of it checkable: when I say a stack holds up, there is a machine here that has been holding it up.
| What | Detail |
|---|---|
| Machines | Five servers, a laptop and a workstation |
| Managed by | Nix flakes — one directory per host, one shared module |
| Public entry | One wildcard DNS record, one host terminating TLS, one reverse proxy |
| Auth | SSO in front of every subdomain |
| Secrets | Per service, encrypted, in the same repository as the config |
| Operations | An agent skill for every service, so an agent can administer what I run |
What I need from it
A homelab is not a smaller datacentre. It has different requirements, and being honest about them is the only way the thing survives contact with a Tuesday evening:
- One front door. Everything public arrives through a single host that terminates TLS. No service gets its own certificate chore, and no service gets to invent its own exposure.
- Authentication before anything else. SSO sits in front of every subdomain, so adding a service doesn't add a password.
- Rebuildable, not precious. A host is a directory. If a machine dies, the directory is the machine.
- Secrets next to the config. Encrypted, versioned, and reviewable in a diff — not in a wiki, not in my head.
- Reviewable changes. Every deploy has a review step before it applies, because the failure mode of declarative infrastructure is applying a mistake everywhere at once.
- Operable by an agent. The newest requirement, and the one that changed the design most: if an agent is going to run administrative tasks, the knowledge of how to run them has to be written down.
The shape of it
A wildcard DNS record points at the router. The router forwards only web traffic to a single machine, and that machine does two jobs: it terminates TLS with Let's Encrypt certificates, and it reverse-proxies to services that live across the rest of the cluster. Everything else stays internal.
That one decision removes most of the operational surface. There is exactly one place where certificates are renewed, one place where a new service is published, and one place to look when a subdomain stops answering. The SSO provider sits on the same host, in front of the proxy, so the authentication decision happens before a request ever reaches an application.
The machines
Five servers, numbered rather than named for their roles, because roles move. The hostnames they actually answer to are the numbered names prefixed with the site's own — the flake targets stay short and the machines stay descriptive.
The laptop is the interesting one: it runs CachyOS, not NixOS, so it is managed by Home Manager instead of a system flake. Declarative user environments on a non-declarative distribution is the compromise that keeps the laptop usable and the dotfiles honest. It has its own review and deploy scripts, because if applying a home configuration is annoying, you stop doing it carefully.
One flake, one directory per host
The repository is deliberately boring:
flake.nixas the entry point, defining every host.common.nixfor what all machines share — which is the only reason five hosts stay maintainable by one person.- One directory per server, each with its own configuration and modules.
config.jsonholding the address and user for each target, so the deploy scripts don't need to know anything about the network.scripts/with the review and deploy pairs — look at the diff, then apply the diff.modules/for things that aren't a host: MCP servers, the agent CLIs, terminal and editor dotfiles.
Secrets live in their own directory tree, one folder per service, encrypted before they ever meet git. That layout is the reason adding a service is a small, reviewable diff rather than an afternoon of ssh and prayer.
What actually runs on it
By category, because the specific list changes every month:
- Files and documents — Nextcloud with Collabora for editing, and Paperless for anything that should be a scanned PDF instead of a drawer.
- Development — a self-hosted GitLab with runners, and an automated review agent sitting on its merge requests.
- Media — PeerTube, because uploading video to someone else's platform was the thing I was trying to stop doing.
- Communication — a Matrix homeserver.
- Knowledge and search — Karakeep for bookmarks, Meilisearch behind it, and Honcho holding long-term memory for the agents.
- Business operations — InvenTree for physical stock, Firefly III for money, OpenProject for work.
- Observability — ActivityWatch for where the time actually goes, and a ClickHouse-backed analytics layer.
- Storage — Garage for S3-compatible object storage, which is what makes the backups possible.
Agents as operators
This is the part I'd point at first. Alongside the host configs sits a directory of agent skills — roughly one per service. Not documentation for humans: instructions an agent loads before it touches GitLab, Nextcloud, Authentik, Paperless, InvenTree, Firefly, PeerTube, the Matrix server, the proxy, the object store, or the secrets.
Each skill is the distilled version of "how to administer this without breaking it" — the commands, the order they go in, and the traps. The consequence is that routine administration stops being a thing I have to remember, and starts being a thing I can dispatch. It also means the knowledge is versioned next to the machine it applies to, so when a service is upgraded, its skill gets upgraded in the same review.
There is a certain circularity to it — agents running the infrastructure that runs the agents — and the honest answer is that it is circular, deliberately, and it has been the single largest change in how this lab is operated.
Deep dives
The rest of this is too specific to sit on one page. These are the pieces worth their own article:
- Reverse proxy and TLS — one front door, wildcard certificates, and what broke
- Authentication — moving to SSO, and the blueprint approach to identity configuration
- Secrets — encrypted at rest, reviewable in a diff
- Storage — object storage and what it made possible
- Backups — the only feature that matters if it has never been restored
- Monitoring — knowing something is wrong before a user does
- Agents and skills — one skill per service, and what that changed