NixOS Homelab
Infrastructure
A 4-host Kubernetes cluster with GPU compute, distributed storage, and decentralized cloud hosting on Akash Network.
Mining Infrastructure Meets Cloud Native
The Challenge
The Solution
Infrastructure Innovation
NFS Config Sync
Profile System
Custom NixOS Modules
Operations & Automation
Automated Deployments
Service Mesh
Observability
Cluster Capabilities
Hardware Infrastructure
AI/ML Services
Akash Cloud Provider
GPUs: RTX 3060 Ti (8GB) - mining<br>RTX 3090 (24GB) - mining<br>RTX 4060 (8GB) - available<br>RTX 4060 (8GB) - available<br>RTX 3060 Ti (8GB) - mining
Storage: beta2 (HDD), beta3 (NVMe), ram
Endpoints: provider.reverb256.ca, *.ingress.provider.reverb256.ca
Active Leases: 0
Infrastructure Timeline
The Journey
Windows + Proxmox
Dual-boot setup with Proxmox servers for testing, Windows as daily driver
Killed Windows
Full commitment to Linux. Started distro hopping journey.
OS Evolution
Omarchy (Arch-based) → CachyOS (optimized Arch) → NixOS (declarative + reproducible)
NixOS Initial Commit
First NixOS configuration. Single host (zephyr) with basic desktop + gaming
AI Gateway v1.0
OpenAI-compatible API, mining infrastructure, multi-GPU support
Gateway v2.0
Middleware architecture with circuit breaker, rate limiting, Redis caching
Cluster Expansion
Added nexus, forge, sentry. Implemented NFS config sync, profile system, 50+ Justfile commands
K8s Phase 1-3: Foundation
Control plane, Flannel CNI, CoreDNS, stateful services (GlitchTip PostgreSQL)
K8s Phase 4-5: Services & GPU
Stateless services (GlitchTip web/worker, SearXNG, n8n), GPU workloads (llama.cpp)
K8s Phase 6-7: Monitoring & Akash
Prometheus + Grafana monitoring, Akash provider with 5 GPUs, audited & ready
Code Explorer
Code Patterns
# NixOS Configuration Pattern
{
# Declarative system configuration
boot.loader.systemd-boot.enable = true;
# Network setup
networking.networkmanager.enable = true;
# User management
users.users.jkro = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
};
# System packages
environment.systemPackages = with pkgs; [
vim git curl wget
];
}# Module Composition Pattern
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
./modules/gpu.nix
./modules/networking.nix
];
# Service configuration with options
services.nginx = {
enable = true;
virtualHosts."example.com" = {
forceSSL = true;
enableACME = true;
root = "/var/www/example";
};
};
# GPU passthrough for ML workloads
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
}# Advanced NixOS Patterns
{ config, pkgs, lib, ... }:
{
# Service configuration with systemd
systemd.services.myservice = {
description = "Custom Service";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "/usr/bin/myservice";
Restart = "on-failure";
};
};
# System activation scripts
system.activationScripts.setup-dirs.text = ''
mkdir -p /var/lib/myservice
chown myservice:myservice /var/lib/myservice
'';
}