A GitOps-driven Kubernetes (k3s) homelab, provisioned with Nix, Terraform, Helm, and Argo CD.
Argo CD watches this repo and syncs the applications defined under charts/, while Terraform bootstraps the cluster plugins and manages Cloudflare DNS.
See docs/DOCUMENTATION.md for the full guide covering:
- Architecture overview (Terraform + Argo CD + GitOps flow)
- Getting started / prerequisites
- Terraform configuration & variables
- The
bin/devhelper CLI - Every Helm chart (
infrastructure,apps,ingress,argoapps) - Secrets management & External Secrets
- OS configuration (Raspberry Pi, OpenWrt routers)
| Area | Tooling |
|---|---|
| Dev environment | Nix (flake.nix) |
| Provisioning | Terraform (tf-*.tf) |
| Cluster plugins | Helm via tf-modules/k8s-helm-charts |
| GitOps | Argo CD (charts/infrastructure) |
| DNS | Cloudflare (tf-dns.tf) |
bin/– helper scripts (CLI atbin/dev)certs/– TLS certificatescharts/– Helm charts (apps/,infrastructure/)docs/– documentationos/– OS-specific configurationtf-modules/– reusable Terraform modulestf-*.tf– Terraform configuration files
This repo uses Nix + Terraform to provision a homelab infrastructure.
- Bootstrap the environment:
nix develop - Initialise Terraform:
terraform init - Review the plan:
terraform plan - Apply the configuration:
terraform apply
Requires a k3s cluster configured as the
homelabkubectl context, plus Cloudflare API tokens.
- Edit
var.auto.tfvarsfor environment-specific values. - Run
./bin/scripts to deploy services. - Use
terraform statecommands to inspect resources. - Argo CD auto-syncs applications from
charts/apps/*.