Personal dotfiles managed with chezmoi for cross-platform development environments.
- Cross-platform: Works on macOS (Intel/Apple Silicon) and Linux
- Platform-aware templates: Conditional configs for Darwin-specific tools
- Work/Personal separation: Template-based git configuration
- Secret management: 1Password integration for sensitive data
- Modern shell setup: zsh with starship, atuin, and productivity tools
Install chezmoi:
# macOS
brew install chezmoi
# Linux
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin# Initialize dotfiles (replace with your repo URL)
chezmoi init --apply https://github.com/yourusername/dotfiles.git
# Or for SSH
chezmoi init --apply git@github.com:yourusername/dotfiles.gitEdit ~/.config/chezmoi/chezmoi.toml to customize:
[data]
name = "your-name"
work_email = "you@company.com"
personal_email = "you@gmail.com"
email_type = "work" # or "personal"
[onepassword]
prompt = false- Shell:
.zshrcwith brew path detection - Git: Work/personal email templates
- SSH: Platform-aware keychain settings
- Terminal: starship, ghostty configurations
- Editor: Complete Neovim setup with plugins
- Tools: atuin (shell history), lazygit, gh (GitHub CLI)
- macOS: AeroSpace window manager (Darwin-only)
- Linux: (Conditional configs as needed)
# Check what would change
chezmoi status
# Apply changes
chezmoi apply
# Edit a config file
chezmoi edit ~/.zshrc
# Add new config file
chezmoi add ~/.config/newapp/config.yml# Pull latest changes
chezmoi update
# Or manually
cd ~/.local/share/chezmoi
git pull
chezmoi applySwitch git configuration by editing ~/.config/chezmoi/chezmoi.toml:
[data]
email_type = "work" # or "personal"Then apply changes:
chezmoi applychezmoi add ~/.config/app/config.ymlchezmoi add --template ~/.config/macos-only-app/configThen edit the template to add conditionals:
{{- if eq .chezmoi.os "darwin" -}}
# macOS-specific config
{{- end -}}For configs with sensitive data, use 1Password integration:
chezmoi add --template ~/.config/app/config.ymlEdit the template:
api_key = "{{ onepassword "item-uuid" "api-key" }}"# Check template syntax
chezmoi execute-template < ~/.local/share/chezmoi/file.tmpl
# Debug template variables
chezmoi dataCheck that tools are installed and paths are correct:
# Verify brew prefix
echo $HOMEBREW_PREFIX
# Check tool locations
which starship atuin# Fix SSH permissions
chmod 600 ~/.ssh/config
chmod 700 ~/.ssh- Shell: zsh (default on macOS 10.15+)
- Package Manager: Homebrew (macOS/Linux)
- Git: For version control
- Neovim: Text editor
- 1Password CLI: Secret management
- Starship: Shell prompt
- Atuin: Shell history sync
- AeroSpace: macOS window manager
- Ghostty: Terminal emulator
#!/bin/bash
# Install common tools via Homebrew
# Core tools
brew install git neovim starship atuin
# Terminal tools
brew install bat lsd zoxide fzf direnv
# Development tools
brew install gh lazygit
# macOS-specific
if [[ "$(uname)" == "Darwin" ]]; then
brew install --cask aerospace ghostty
fi- Make changes to configs in
~/.local/share/chezmoi/ - Test with
chezmoi apply --dry-run - Commit and push changes
- Test on different platforms
Personal dotfiles - use at your own discretion.