Overview
The project uses devenv for declarative development environment management, providing a consistent setup across all platforms (macOS, Linux, WSL2) with automatic shell integration via direnv.Prerequisites
- Nix with flakes enabled
- direnv (optional but recommended)
- Docker (for kind clusters)
Quick Start
Configuration
The development environment is configured indevenv.nix, which automatically installs all required tools and sets up helper scripts.
Available Tools
The following tools are automatically available in the development shell:Kubernetes Tools
- kind - Local Kubernetes cluster
- kubectl - Kubernetes CLI
- kubernetes-helm - Helm package manager
- argocd - ArgoCD CLI
Networking & Service Mesh
- cilium-cli - Cilium CNI management
- hubble - Network observability
- istioctl - Istio service mesh CLI
Secret Management
- sops - Secrets encryption
- age - Modern encryption tool
Dashboards as Code
- go-jsonnet - Jsonnet compiler
- jsonnet-bundler - Jsonnet package manager
- grafanactl - Grafana management
Container Operations
- skopeo - Container image operations
Nix Utilities
- nh - Nix helper
- nix-output-monitor - Build output monitoring
- nix-tree - Dependency visualization
- nurl - Nix URL generator
Other Tools
- git - Version control
- watchexec - File watcher
- cloudflared - Cloudflare Tunnel client
Development Scripts
The devenv configuration provides convenient wrapper scripts for common operations:Cluster Management
Bootstrap Commands
Development Workflow
Installation Commands
Utilities
Watch Manifests Workflow
For rapid development, use thewatch-manifests command to automatically regenerate and apply manifests when nixidy modules change:
- Watches all
.nixfiles in the nixidy/ directory - Automatically runs
gen-manifests.shon changes - Applies updated manifests with
kubectl apply -f manifests/ - Restarts on errors
Shell Environment
Enter Shell Message
When entering the development shell, you’ll see:Environment Variables
The following environment variables are automatically set:R2_BUCKET_URL- Cloudflare R2 bucket for OTel Collector images
Git Hooks
Pre-commit hooks are automatically configured:- treefmt - Automatic code formatting
- shellcheck - Shell script validation (with
-x -P SCRIPTDIRflags)
Code Formatting
The project uses treefmt for automatic code formatting:treefmt-programs.nix.
Platform Support
The development environment supports:- macOS (Intel and Apple Silicon)
- Linux (x86_64 and aarch64)
- WSL2 (Windows Subsystem for Linux)
scripts/lib/platform.sh.
Troubleshooting
Docker Not Running
If you see Docker-related errors, ensure Docker Desktop is running:Nix Evaluation Errors
Run the sanity check to quickly validate Nix expressions:Debugging Kubernetes Issues
Use the debug helper to see pod status and recent events:Next Steps
- Learn about nixidy module structure
- Explore Grafana dashboard development
- Run bootstrap benchmarks