Skip to main content

Homelab: The Data Fortress

A comprehensive, declarative configuration for personal infrastructure built on NixOS and Home Manager. It manages everything from physical servers and desktops to virtualized environments and Android devices, leveraging Nix Flakes for reproducibility and hermetic builds.

Core Philosophy

Declarative Everything

If it’s not in code, it doesn’t exist. Every aspect of your infrastructure is version-controlled and reproducible.

Single Command Invocation

Deployment and updates are as simple as one command. No manual configuration steps required.

Dynamic Discovery

The system automatically finds and imports configurations. No need to manually register every new file or host.

Stability First

nix flake check is the law. All changes must pass validation before deployment.

Key Features

Multi-Platform Support

Unified configuration management for NixOS systems, Home Manager (standalone and system-bound), and Nix-on-Droid for Android devices.

Automatic Discovery

Flake automatically discovers and imports system, home, and droid configurations from their respective directories.

Secrets Management

Integrated secrets management using agenix with encryption based on host SSH keys or age user keys.

GitOps Ready

Full GitOps workflow support with automatic deployments via Comin and CI/CD validation checks.

Modular Architecture

Reusable modules organized by scope: NixOS system-level, Home Manager user-level, and Nix-on-Droid Android-level.

Infrastructure as Code

Complete infrastructure defined in Nix with disko for disk management, lanzaboote for secure boot, and more.

What You Can Manage

This homelab configuration supports a wide range of devices and use cases:
  • Physical Servers - Full NixOS configurations with hardware-specific settings
  • Desktop Workstations - KDE Plasma desktop environments with gaming support
  • Laptop Systems - Mobile workstations with power management and hybrid GPU setups
  • Android Devices - Termux environments via Nix-on-Droid
  • Virtual Machines - Docker, QEMU/KVM, and Talos Kubernetes clusters
  • User Environments - Consistent dotfiles and applications across all systems

Quick Example

Here’s how simple it is to deploy a new system:
# Clone the repository
git clone https://github.com/soriphoono/homelab.git homelab
cd homelab

# Enable development environment
direnv allow  # or: nix develop

# Deploy a NixOS system
nixos-rebuild switch --flake .#hostname

# Deploy a Home Manager configuration
home-manager switch --flake .#username
The entire homelab configuration is validated on every change with nix flake check, ensuring stability and catching errors before deployment.

Architecture Highlights

The repository uses a Flake-based architecture with intelligent automatic discovery:
  • Systems (systems/) - Each directory becomes a NixOS configuration
  • Homes (homes/) - User configurations with base, global, and host-specific overrides
  • Droids (droids/) - Android device configurations for Termux
  • Modules (modules/) - Reusable logic organized by platform
  • Packages (pkgs/) - Custom packages and overlays

Ready to Get Started?

Quick Start

Get your homelab up and running in minutes

Architecture

Understand the flake structure and design patterns

Build docs developers (and LLMs) love