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
AI Inference Gateway Status
Gateway Health
Knowledge Fabric
MCP Servers
Operations & Automation
Automated Deployments
Service Mesh
Observability
Cluster Capabilities
Hardware Infrastructure
AI/ML Services
Akash Cloud Provider
GPUs: Available for deployment
Usage: Burst workloads, CI/CD agents
Integration: Via Kubernetes service mesh
Benefit: Cost-effective GPU bursting
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
Production Cluster Live
60+ pods running across 4 hosts. AI inference, mining, monitoring, and Akash provider fully operational
Blog Content Collections
Migrated blog to Astro Content Collections. Type-safe content management with automated OG image generation.
Infrastructure Extraction
Extracted MCP Registry and Knowledge Fabric into standalone NixOS projects with flake.nix, NixOS modules, and CI pipelines.
Gateway V2.1
Connection pooling, response caching, K8s embed-server integration, and OCI container image builds for the AI inference gateway.
Code Quality Automation
Standardized pre-commit hooks (statix, deadnix, lint) across all infrastructure projects. Automated code quality enforcement.
Portfolio Design V2
16-theme retro gaming design system with Base24-compliant semantic tokens, theme-aware components across the entire portfolio.
Semantic Token Redesign
Theme architecture streamlined. Removed theme preview system, migrated to pure semantic tokens for maintainability.
Integration Roadmap Complete
Cross-codebase integration roadmap covering MCP ecosystem, knowledge pipeline, GPU federation, and unified auth across 12 repositories.
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
'';
}