GitHunt

dotfiles

Personal dotfiles managed with chezmoi.

Installation

curl -fsSL https://raw.githubusercontent.com/gr1m0h/dot/main/install.sh | sh

This installs:

  • chezmoi (if needed)
  • All dotfiles and configurations
  • Homebrew packages
  • Development tools via mise

Update

chezmoi update

Manual Installation

# Install chezmoi
brew install chezmoi

# Initialize and apply
chezmoi init --apply gr1m0h/dot

Options

Preview changes

chezmoi diff

Edit configuration

chezmoi edit <file>

Update from repo

chezmoi update

Apply without downloading

chezmoi apply

Editing Files Managed by chezmoi

When you want to modify dotfiles managed by chezmoi, you have two approaches:

# 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 apply

Method 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 diff

Common operations

See which files are managed by chezmoi

chezmoi managed
chezmoi cd

Update from remote repository

# Pull latest changes and apply them
chezmoi update

Working 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.tmpl

Examples

# Edit zsh configuration
chezmoi edit ~/.zshrc

# Edit git configuration
chezmoi edit ~/.config/git/config

# Edit Ghostty configuration
chezmoi edit ~/.config/ghostty/config

Important notes

  • Always use chezmoi edit for files managed by chezmoi to ensure changes are properly tracked
  • Use chezmoi diff before applying to preview changes
  • Local edits without chezmoi add will be overwritten on next chezmoi apply
  • Template files (.tmpl) are processed during chezmoi 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

  1. During initial setup, the script home/.chezmoiscripts/run_once_02-install-packages.sh.tmpl runs
  2. It copies Brewfile to your home directory and runs brew bundle
  3. After successful installation, you can remove the Brewfile:
    rm ~/Brewfile

Documentation

Requirements

  • macOS 14.0+
  • Internet connection
  • Admin privileges (for some configurations)
gr1m0h/dot | GitHunt