Cross-platform dotfiles managed with chezmoi for macOS, Linux, and WSL.
- Cross-platform support: Works on macOS, Linux, and WSL
- Modern CLI tools: bat, eza, fd, delta, ncdu, httpie, tmux
- Shell configuration: Zsh with oh-my-zsh, antigen, and powerlevel10k
- Node.js management: fnm for version management
- Package management: Homebrew integration across platforms
- Docker support: Platform-specific Docker configuration
- Git configuration: GPG signing and delta diff viewer
- VS Code configuration: Settings, keybindings, and extensions
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply $GITHUB_USERNAME
-
Install chezmoi:
# macOS brew install chezmoi # Linux/WSL curl -sfL https://git.io/chezmoi | sh
-
Initialize with this repository:
chezmoi init https://github.com/yourusername/dotfiles.git
-
Apply the configuration:
chezmoi apply
- Edit dotfiles:
chezmoi edit ~/.zshrc
- Apply changes:
chezmoi apply
- Check status:
chezmoi status
- Update from repo:
chezmoi update
.
├── dot_zshrc # Zsh configuration
├── dot_p10k.zsh # Powerlevel10k theme config
├── dot_claude/ # Claude Code configuration
│ └── settings.json
├── dot_config/Code/User/ # VS Code configuration
│ ├── settings.json.tmpl # VS Code settings
│ ├── keybindings.json # Custom keybindings
│ └── extensions.json # Recommended extensions
├── run_once_install-packages.sh.tmpl # Package installation script
└── run_once_after_chsh.sh.tmpl # Shell change script
- Homebrew package management
- macOS-specific applications (Rectangle, Alfred, VS Code)
- System preferences configuration
- Linuxbrew package management
- Linux-specific package variants
- Cross-platform CLI tools
- Windows Subsystem for Linux support
- WSL-specific aliases and configurations
- Docker integration handling
Edit run_once_install-packages.sh.tmpl
and add packages to the appropriate arrays:
commonPackages
: Available on all platformsmacosSpecific
: macOS-only packagesmodernCli
: Modern CLI tool replacements
The zsh configuration includes:
- History management with optimal settings
- Auto-completion enhancements
- Modern CLI tool aliases
- Platform-specific configurations
The VS Code setup includes:
- Settings: Cross-platform editor preferences with font ligatures, formatting, and productivity features
- Keybindings: Custom shortcuts for enhanced productivity
- Extensions: Curated list of recommended extensions for development
- Database support: SQLite viewer and SQLTools integration
- Language support: Python, JavaScript, TypeScript, Rust, Go, and more
- Permission errors: Ensure proper PATH configuration in
dot_zshrc
- Missing directories: The setup creates necessary directories automatically
- Package conflicts: Check platform-specific package lists
- Check chezmoi status:
chezmoi doctor
- Verify templates:
chezmoi execute-template
- Dry run changes:
chezmoi apply --dry-run
- Make changes to the dotfiles
- Test on your platform
- Commit changes with descriptive messages
- Ensure cross-platform compatibility
MIT License - feel free to use and modify as needed.