This repo manages personal/work dotfiles with chezmoi.
Use this on a brand-new machine.
- Install Xcode Command Line Tools.
xcode-select --install- Install Homebrew.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
if [ -x /opt/homebrew/bin/brew ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -x /usr/local/bin/brew ]; then
eval "$(/usr/local/bin/brew shellenv)"
fi- Install base tooling used by these dotfiles.
brew install git chezmoi fish tmux neovim bat git-delta lazygit jq zoxide atuin pyenv fzf yt-dlp- Set Fish as the default shell.
which fish
grep -q "$(which fish)" /etc/shells || echo "$(which fish)" | sudo tee -a /etc/shells
chsh -s "$(which fish)"- Initialize chezmoi source and apply dotfiles.
chezmoi init <your-repo-url>- Set required chezmoi template data.
Create ~/.config/chezmoi/chezmoi.toml:
[data]
git_name = "Your Name"
git_email = "you@company.com"- Apply dotfiles.
chezmoi apply- Install Fisher and Fish plugins declared in
.config/fish/fish_plugins.
Open a new Fish shell, then run:
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source
fisher install (cat ~/.config/fish/fish_plugins)- Install tmux plugin manager (TPM) and tmux plugins.
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpmThen start tmux and press Ctrl-a then Shift-i (capital I) to install plugins.
This config uses Ctrl-a as tmux prefix.
- Bootstrap Neovim plugins.
nvimlazy.nvim auto-installs on first launch. Quit and reopen once after install.
- Optional app login/bootstrap.
- Atuin sync:
atuin login - Cursor and VS Code settings are already managed by chezmoi at:
~/Library/Application Support/Cursor/User/settings.json~/Library/Application Support/Code/User/settings.json
dot_gitconfig.tmpl expects:
git_namegit_email
Optional machine-specific git overrides can go in:
~/.gitconfig.local
That file is included by generated ~/.gitconfig.
# see drift
chezmoi status
# edit a managed file
chezmoi edit ~/.gitconfig
# apply source changes to target
chezmoi apply
# add a new file to source state
chezmoi add ~/.somefile
# stop managing a file
chezmoi forget ~/.somefileDo not commit machine-generated Fish files. This repo ignores:
.config/fish/fish_variables.config/fish/config.fish-e
For ~/.config/fish/functions:
- Keep custom functions in repo.
- Do not vendor third-party plugin function files.
- Keep plugin declarations in
.config/fish/fish_plugins.
- SSH 1Password agent is configured conditionally in
.ssh/config. IdentityAgentis applied only when the 1Password socket exists.- This keeps SSH config portable across machines with and without 1Password.
ForwardAgent yesis currently global in this repo. If you want tighter security, set it tonoglobally and enable per host.
When adding new dotfiles, avoid:
- hardcoded usernames/paths (for example
/Users/<name>) - machine IDs or hardware serials unless intentional
- generated caches/history/session files
- lock/state artifacts generated by tools
If a file is machine-local:
- keep it out of source state with
chezmoi forget, or - template/guard machine-specific sections.