A comprehensive, declarative development environment for macOS and Linux with integrated AI tooling
This configuration provides a unified development setup across Apple Silicon Macs and ARM64 Linux environments, featuring seamless package management, shell customization, and Claude Code integration for enhanced productivity.
- Git & GitHub CLI - Version control with seamless GitHub integration
- Neovim - Modern Vim with LazyVim configuration and LSP support
- tmux - Terminal multiplexer with custom configuration
- Ripgrep, Ack, Bat - Enhanced search and file viewing tools
- Direnv - Per-directory environment management
- Docker & Docker Compose - Containerization support (Linux)
- ZSH - Feature-rich shell with Oh My Posh theming
- Zoxide - Smart directory navigation
- Eza - Modern
lsreplacement with colors and icons - Carapace - Universal shell completion for CLI tools
- fzf - Interactive fuzzy finder for command line
- gh-dash - GitHub CLI dashboard for PRs and issues (alias:
ghd)
- Productivity: Raycast, Notion Calendar, SuperWhisper
- Development: Orbstack, Ghostty terminal
- Security: 1Password, 1Password CLI
- Communication: Linear, Slack, Claude desktop
- Media: Spotify, VLC
- Claude Code - Advanced AI coding assistant with custom commands
- Linear Commands - Project management integration
- Custom Hooks - Automated linting and quality checks
- MCP Servers - Extended AI capabilities
- Tailscale - Secure networking across devices
- AWS CLI & Tools - Cloud development support
- SSH Configuration - 1Password integration for seamless key management
- Kubernetes Tools - Container orchestration support
# Install Nix
sh <(curl -L https://nixos.org/nix/install)
# Clone and apply
git clone https://github.com/svnlto/nix-config.git ~/.config/nix
cd ~/.config/nix
nixswitch# Install Nix
sh <(curl -L https://nixos.org/nix/install) --daemon
# Clone and apply (first time - specify architecture)
git clone https://github.com/svnlto/nix-config.git ~/.config/nix
cd ~/.config/nix
home-manager switch --flake .#desktop-x86 # x86_64 (Intel/AMD)
# OR
home-manager switch --flake .#desktop-arm # ARM64
# After first install, auto-detects architecture:
nixswitch# Install Nix
sh <(curl -L https://nixos.org/nix/install) --daemon
# Clone and apply (first time)
git clone https://github.com/svnlto/nix-config.git ~/.config/nix
cd ~/.config/nix
home-manager switch --flake .#minimal-x86 # x86_64
# OR
home-manager switch --flake .#minimal-arm # ARM64 (EC2, DevPods)
# After first install:
nixswitch├── flake.nix # 🎯 Main orchestrator - all configurations
├── common/ # 🔄 Shared across platforms
│ ├── packages.nix # 📦 Centralized package definitions
│ ├── profiles/ # 🎨 Optional features (Hyprland, etc.)
│ ├── claude-code/ # 🤖 AI assistant integration
│ ├── neovim/ # ⚡ Editor configuration
│ ├── tmux/ # 🖥️ Terminal multiplexer
│ └── zsh/ # 🐚 Shell environment
└── systems/
├── aarch64-darwin/ # 🍎 macOS-specific (nix-darwin)
│ ├── homebrew.nix # 🍺 GUI applications
│ ├── defaults.nix # ⚙️ System preferences
│ └── dock.nix # 📱 Dock configuration
└── aarch64-linux/ # 🐧 Linux-specific (home-manager)
# Works on both x86_64 and ARM64
- Core Packages: Essential CLI tools (eza, bat, zoxide, fzf)
- Dev Packages: Development utilities (gh, lazygit, ripgrep, tmux)
- System Packages: macOS system-level tools (git, tree)
- GUI Applications: macOS apps via Homebrew
# Add to all systems
echo 'new-package' >> common/packages.nix
# macOS GUI applications
echo '"new-app"' >> systems/aarch64-darwin/homebrew.nix
# Linux-specific packages
echo 'package-name' >> systems/aarch64-linux/home-linux.nix# Apply configurations (works on macOS and Linux)
nixswitch # Auto-detects platform, architecture, and config type
# Update and rebuild
git pull && nixswitch # Update flake inputs and rebuild
# Development
nix develop # Enter development shell with tools
nix flake check # Validate configuration# Linux Desktop (with Hyprland)
.#desktop-x86 # x86_64 (Intel/AMD laptops/desktops)
.#desktop-arm # ARM64 (cloud instances, DevPods)
# Linux Minimal (servers/containers)
.#minimal-x86 # x86_64 servers
.#minimal-arm # ARM64 (EC2, cloud instances)
# macOS
.#rick # Auto-detects via hostname# System status
nix-status # Detailed system information
# Cleanup (macOS only, set CLEANUP_ON_REBUILD=true)
CLEANUP_ON_REBUILD=true nixswitch
# Rollback
sudo darwin-rebuild rollback # macOS
home-manager generations # Linux (shows available)# Code formatting and linting
nixfmt-classic **/*.nix # Format Nix code
statix check # Check for issues
deadnix --edit # Remove dead code
# Package management
nix search nixpkgs <name> # Find packages
nix profile list # Show installed packagesEdit flake.nix to add new machine configurations:
# macOS
"new-hostname" = mkDarwinSystem {
hostname = "new-hostname";
username = "your-username";
};
# Linux
"new-user" = mkHomeManagerConfig {
username = "new-user";
};ZSH configuration is shared via common/zsh/shared.nix:
- Aliases: Common shortcuts and system-specific commands
- History: Encrypted sync with Atuin
- Prompt: Oh My Posh with custom theme
- Completion: Enhanced with Carapace
Advanced AI coding assistant with:
- Custom Commands: Linear integration, conventional commits
- Quality Hooks: Automated linting and formatting
- Remote Commands: Fetched from dedicated repository
- Settings: Managed via out-of-store symlinks for easy editing
- 1Password SSH Agent: Seamless SSH key management
- Tailscale Integration: Secure device connectivity
- Credential Isolation: Proper separation of user/system secrets
- Validated Configurations: Runtime username validation with helpful errors
- Host-VM Separation: Clean macOS host with isolated development VMs
- ARM64 Optimized: First-class support for Apple Silicon and ARM cloud instances
- Consistent Environments: Same tools and configurations across all platforms
- Cloud Ready: Pre-configured for AWS, GitHub, and container workflows
Built-in performance tuning:
- Parallel Builds: Auto-detected core count utilization
- Download Optimization: 256MB buffers, 50 HTTP connections
- Store Optimization: Automatic Nix store maintenance
- Substituter Caching: Fast binary downloads from trusted sources
# Build failures
nixswitch --show-trace # Detailed error information
hmswitch --show-trace # Linux equivalent
# Validation errors
nix eval .#darwinConfigurations.rick.system # Test macOS config
nix eval .#homeConfigurations.linux.activationPackage # Test Linux config
# Emergency recovery
sudo darwin-rebuild rollback # macOS
home-manager generations # Linux - list available rollbacks- Check the CLAUDE.md for detailed development guidance
- Review configuration files in the appropriate
systems/directory - Use
nix developfor access to development tools and validation
Built with ❤️ using Nix, nix-darwin, and Home Manager