For a new Mac, run this one-liner:
git clone <your-repo-url> ~/dotfiles && ~/dotfiles/install.shIf you prefer manual control:
# 1. Clone the repository
git clone <your-repo-url> ~/dotfiles
# 2. Install Homebrew (if needed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# 3. Install chezmoi
brew install chezmoi
# 4. Install dependencies
cd ~/dotfiles && brew bundle
# 5. Install dotfiles
# (--source only affects this one invocation and isn't persisted, so also
# write it to chezmoi.toml -- otherwise every later plain `chezmoi apply`
# falls back to the default source dir and fails)
mkdir -p ~/.config/chezmoi
cat > ~/.config/chezmoi/chezmoi.toml <<'EOF'
sourceDir = "$HOME/dotfiles"
EOF
chezmoi apply -v
# 6. Change shell to zsh (if needed)
chsh -s $(which zsh)Your Git configuration uses 1Password for SSH signing. To set this up:
- Install 1Password (included in Brewfile)
- Sign in to your 1Password account
- Go to 1Password → Settings → Developer
- Enable "Use the SSH agent"
- Enable "Display key names when authorizing connections" (optional, but helpful)
-
In 1Password, create a new SSH Key item:
- Title: "Git Signing Key" (or similar)
- Private Key: Your existing SSH private key, or generate a new one
- Public Key: Will be auto-generated or paste your existing public key
-
Copy the public key from 1Password
Your gitconfig is already configured for 1Password SSH signing, but you need to:
-
Add your public key to
~/.ssh/allowed_signers:echo "tonyc.t.hsu@gmail.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF1GXPznqwRRaFOpx6euCAiiiEUs93JC3czqvQq+777v" >> ~/.ssh/allowed_signers
(Replace with your actual public key)
-
Add your public key to GitHub:
- Go to GitHub → Settings → SSH and GPG keys
- Click "New SSH key"
- Paste your public key
- Set the key type to "Signing Key"
# Test SSH connection
ssh -T git@github.com
# Test a signed commit
git commit --allow-empty -m "Test signed commit"
git log --show-signature -1If a machine is still running the old rcm-based setup (from before this repo switched to
chezmoi), bring it in line like this:
# 1. Backup anything rcm currently manages, in case of local edits that never
# made it back into the repo
mkdir -p ~/dotfiles-backup
for f in ~/.zshrc ~/.vimrc ~/.gitconfig ~/.tmux.conf ~/.ssh/config; do
[ -e "$f" ] && cp -a "$f" ~/dotfiles-backup/
done
# 2. Pull the migrated repo
cd ~/dotfiles && git pull
# 3. Install chezmoi if not already present
brew install chezmoi
# 4. Point chezmoi at this checkout as its source dir
# (chezmoi init --source exists but only applies to that one invocation
# and isn't persisted, so it's written directly here instead)
mkdir -p ~/.config/chezmoi
cat > ~/.config/chezmoi/chezmoi.toml <<'EOF'
sourceDir = "$HOME/dotfiles"
EOF
# 5. Dry-run first — see exactly what would change before touching anything
chezmoi diff
# 6. Apply
chezmoi apply -v
# 7. Once confirmed working, remove the old rcm setup
rm -f ~/.rcrc
brew uninstall rcmOn a machine that never ran rcm against this repo, skip straight to
~/dotfiles/install.sh, which now bootstraps chezmoi automatically.
After making changes to your dotfiles:
# Re-run dotfiles installation
chezmoi apply
# Install new packages (if Brewfile changed)
brew bundle
# Update vim plugins (if vimrc.bundles changed)
vim -u ~/.vimrc.bundles +PlugUpdate +PlugClean! +qaIf you see shell errors after installation:
# Restart your shell
exec zsh
# Or restart your terminal completelyIf you get permission errors:
# Fix permissions on your home directory
sudo chown -R $(whoami):staff ~If Git signing isn't working:
- Verify 1Password SSH agent is enabled
- Check that your public key is in
~/.ssh/allowed_signers - Verify the key is added to GitHub as a signing key
- Test with
ssh -T git@github.com