dotfiles
Personal dotfiles managed with chezmoi.
Installation
curl -fsSL https://raw.githubusercontent.com/gr1m0h/dot/main/install.sh | shThis installs:
- chezmoi (if needed)
- All dotfiles and configurations
- Homebrew packages
- Development tools via mise
Update
chezmoi updateManual Installation
# Install chezmoi
brew install chezmoi
# Initialize and apply
chezmoi init --apply gr1m0h/dotOptions
Preview changes
chezmoi diffEdit configuration
chezmoi edit <file>Update from repo
chezmoi updateApply without downloading
chezmoi applyEditing Files Managed by chezmoi
When you want to modify dotfiles managed by chezmoi, you have two approaches:
Method 1: Edit source files directly (Recommended)
# Edit the source file in chezmoi's directory
chezmoi edit ~/.zshrc
# Preview what changes will be applied
chezmoi diff
# Apply changes to your home directory
chezmoi applyMethod 2: Edit local files then add changes
# Edit the file in your home directory
vim ~/.zshrc
# Add the changes back to chezmoi
chezmoi add ~/.zshrc
# Verify the changes were captured
chezmoi diffCommon operations
See which files are managed by chezmoi
chezmoi managedNavigate to chezmoi source directory
chezmoi cdUpdate from remote repository
# Pull latest changes and apply them
chezmoi updateWorking with template files
Some files use chezmoi's templating feature (.tmpl extension):
# Edit a template file
chezmoi edit ~/.config/git/config
# The source might be a template like:
# ~/.local/share/chezmoi/home/dot_config/git/config.tmplExamples
# Edit zsh configuration
chezmoi edit ~/.zshrc
# Edit git configuration
chezmoi edit ~/.config/git/config
# Edit Ghostty configuration
chezmoi edit ~/.config/ghostty/configImportant notes
- Always use
chezmoi editfor files managed by chezmoi to ensure changes are properly tracked - Use
chezmoi diffbefore applying to preview changes - Local edits without
chezmoi addwill be overwritten on nextchezmoi apply - Template files (
.tmpl) are processed duringchezmoi apply
Brewfile Management
The Brewfile in this repository is designed for initial setup only. It installs all required Homebrew packages during the first run.
How it works
- During initial setup, the script
home/.chezmoiscripts/run_once_02-install-packages.sh.tmplruns - It copies
Brewfileto your home directory and runsbrew bundle - After successful installation, you can remove the Brewfile:
rm ~/Brewfile
Documentation
- Ghostty-Nvim File Association Setup - Configure file associations to open files in Ghostty with Nvim
Requirements
- macOS 14.0+
- Internet connection
- Admin privileges (for some configurations)