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
ls
replacement 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 with flakes
sh <(curl -L https://nixos.org/nix/install)
# Clone configuration
git clone https://github.com/svnlto/nix-config.git ~/.config/nix
cd ~/.config/nix
# Apply configuration (auto-detects hostname)
nixswitch
# Install Nix
sh <(curl -L https://nixos.org/nix/install) --daemon
# Clone and apply configuration
git clone https://github.com/svnlto/nix-config.git ~/.config/nix
cd ~/.config/nix
hmswitch # Generic Linux configuration
# For specific user configurations
home-manager switch --flake ~/.config/nix#ubuntu # Ubuntu user
βββ flake.nix # π― Main orchestrator - all configurations
βββ common/ # π Shared across platforms
β βββ packages.nix # π¦ Centralized package definitions
β βββ 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)
- 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
nixswitch # macOS (auto-detects hostname)
hmswitch # Linux (generic configuration)
hm-user # Linux (user-specific configuration)
# Update and rebuild
git pull && nixswitch # macOS with updates
hm-upgrade # Linux with flake updates
# Development
nix develop # Enter development shell with tools
nix flake check # Validate configuration
# 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 packages
Edit 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 develop
for access to development tools and validation
Built with β€οΈ using Nix, nix-darwin, and Home Manager