This repository contains my home infrastructure-as-code, managing Kubernetes clusters, cloud resources, and on-premises virtualization using GitOps principles. Flux watches this repository and applies changes automatically to maintain desired state across my infrastructure.
This is a multi-cloud, multi-environment setup supporting home automation, media services, monitoring, and infrastructure experiments.
Related Repositories:
- anthr76/snowflake - System-level configuration (NixOS, routers, nodes)
- Flux - GitOps operator for Kubernetes
- Cilium - eBPF-based container networking (CNI)
- Rook Ceph - Distributed storage for persistent volumes
- VolSync - Asynchronous PVC replication to rsync.net
- CloudNative-PG - PostgreSQL operator
- Renovate - Automated dependency updates
- External Secrets - Secret synchronization (migrating to Bitwarden Secrets Manager)
- Reloader - Automatic pod restarts on config changes
Flux monitors this Git repository and recursively applies Kustomizations in k8s/clusters/<cluster-name>/. Applications are deployed as HelmReleases with dependency management. Renovate watches for updates to container images, Helm charts, and Terraform modules, automatically creating pull requests.
.
βββ armature/prod/ # Production infrastructure (Terraform)
β βββ cloud-dns/ # Cloudflare DNS management
β βββ gcp/ # Google Cloud Platform (phasing out)
β βββ scr1/ # Primary on-premises site (migrating to qgr1)
β βββ nwk1/ # Secondary network site
β βββ b2/ # Backblaze B2 storage
βββ k8s/ # Kubernetes manifests
β βββ base/ # Base configs (namespace = directory name)
β β βββ flux-system/ # Flux and HelmRepositories
β β βββ home/ # Home automation (Home Assistant, ESPHome)
β β βββ media/ # Media services (Plex, qBittorrent)
β β βββ monitoring/ # Prometheus, Grafana, Alert Manager
β β βββ database/ # PostgreSQL, Redis, CouchDB
β β βββ ... # Other namespaces
β βββ clusters/ # Cluster-specific overlays
β βββ qgr1-cluster-0/ # Primary on-prem cluster
β βββ civo-mgmt-0/ # Management cluster
βββ docs/ # Documentation
βββ hack/ # Utilities and scripts
Key Principles:
- Each directory under
k8s/base/maps 1:1 to a Kubernetes namespace - All HelmRepository resources live in
k8s/base/flux-system/helm-chart-repositories/ - Cluster-specific overrides use Kustomize overlays in
k8s/clusters/
While this infrastructure is primarily self-hosted, it relies on some cloud services:
| Service | Use Case | Cost (Approx) |
|---|---|---|
| Cloudflare | DNS, CDN, tunnels | ~$50/yr |
| rsync.net | Off-site PVC backups (VolSync) | Variable |
| Terraform Cloud | Remote state management | Free tier |
| Bitwarden | Secrets management (migrating to) | ~$40/yr |
- devenv - Nix-based development environments
- just - Task automation (preferred over scripts)
- pre-commit - Git hooks for YAML linting and secret detection
- NixOS - Declarative Linux distribution for infrastructure nodes
- Prometheus - Metrics collection
- Grafana - Visualization and dashboards
- Alert Manager - Alert routing and management
- Home Automation: Home Assistant, ESPHome, Zigbee2MQTT, Z-Wave JS UI
- Media: Plex, qBittorrent, cross-seed
- Networking: Unifi Controller
- Databases: PostgreSQL (CloudNative-PG), Redis, CouchDB
This repository uses devenv for consistent tooling across environments:
# Install devenv (if not already installed)
# See: https://devenv.sh/getting-started/
# Enter development environment (automatically installs all tools)
devenv shell
# Or use direnv for automatic activation
direnv allow# List all available automation tasks
just --list
# Reconcile all Flux resources
just flux-reconcile
# Sync Flux GitRepos, Kustomizations, and HelmReleases
just flux-sync
# Suspend/resume Flux resources (useful for maintenance)
just flux-suspend
just flux-resume# Check Flux status
flux get all -A
# Manually reconcile a resource
flux reconcile source git flux-system
flux reconcile kustomization <name>
# View Flux logs
flux logs --all-namespacesThis infrastructure is undergoing several significant transitions:
Migrating from External Secrets (GCP Secret Manager) to Bitwarden Secrets Manager for all Kubernetes secrets.
Infrastructure provisioning moving away from Terraform to configurations managed in anthr76/snowflake.
Infrastructure nodes migrated to NixOS. Legacy Fedora CoreOS and Talos Linux configurations deprecated.
Google Cloud Platform resources (GKE, Secret Manager) being migrated away.
Primary site designation changing from scr1 to qgr1 due to physical relocation. This affects DNS, certificates, cluster names, and monitoring.
- CLAUDE.md - Guidance for Claude Code when working with this repository
- docs/ - Additional setup guides and documentation
- .github/instructions/ - Comprehensive coding standards and guidelines
Feel free to open a GitHub issue if you have questions!
Join the community:
Inspiration from these amazing repositories:
- onedr0p/home-ops
- bjw-s/k8s-gitops
- xUnholy/k8s-gitops
- billimek/k8s-gitops
- carpenike/k8s-gitops
- blackjid/homelab-gitops
- IronicBadger/infra