A declarative and reproducible NixOS configuration for my personal homelab, built with Nix Flakes and deployed remotely with Colmena.
- Declarative & Reproducible: The entire system state is defined as code. Nix Flakes lock all dependencies for consistent, reliable builds.
- Remote Management: Colmena deploys configurations to remote machines seamlessly over SSH.
- Secrets Management: Sensitive information is encrypted using sops-nix and is never committed to the repository in plaintext.
This configuration deploys a service-oriented homelab using the following key components:
- Reverse Proxy: Traefik for routing traffic to services.
- Identity & Access: Keycloak for centralized authentication, secured with
oidc-middleware
. - Database: PostgreSQL for persistent data storage.
- Komodo: Komodo for a Docker-based build and deployment system.
If you want to understand the methodology behind this setup and build a similar system from scratch, these blog posts provide an excellent foundation: