My personal dotfiles for macOS, managed with Ansible.
# Clone the repository
git clone https://github.com/michaelbarton/dotfiles.git ~/.dotfiles
# Apply configuration with Ansiblecd~/.dotfiles
make applyuv run ansible-playbook -i ~/.dotfiles/ansible/inventory.ini ~/.dotfiles/ansible/dotfiles.yml --tags "hooks,setup"Tagged never tasks (run explicitly when needed):
# Install Homebrew packages from Brewfile, prune orphans, clean caches
make packages
# Optional bioinformatics tools
make packages-bio
# macOS defaults and Dock (requires sudo)
uv run ansible-playbook -i ~/.dotfiles/ansible/inventory.ini ~/.dotfiles/ansible/dotfiles.yml --tags macos --ask-become-passSince macOS 13.2, defaults write against a sandboxed app silently writes to
the wrong plist unless the terminal has Full Disk Access — the command succeeds
and does nothing.
make fmt_check
make nvim-check
make nvim-update # sync plugins and refresh lazy-lock.jsoncurl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish |source&& fisher install jorgebucaran/fisher
fish -c "fisher update"For machine-specific settings, create:
~/.local/environment.bashfor Bash settings~/.local/environment.fishfor Fish settings
GIT_AUTHOR_*/GIT_COMMITTER_* env vars are not set globally because they
override every gitconfig level, making per-repo identity impossible. Instead,
git/gitconfig includes ~/.config/git/config-local if present. On a machine
that needs a work identity, create it by hand (never committed — it names your
employer):
[includeIf "hasconfig:remote.*.url:git@github.com:<org>/**"]
path=~/.config/git/config-workAnd ~/.config/git/config-work:
[user]
email=you@work-example.comname=YourNameRequires git 2.36+ for hasconfig:. Verify with:
cd<a work checkout>&& git var GIT_AUTHOR_IDENT # expect work addresscd~/.dotfiles && git var GIT_AUTHOR_IDENT # expect personal addressTracked claude/settings.json holds only shareable defaults (hooks,
permissions, effortLevel, tui, theme). Machine-local keys — model,
enabledPlugins, extraKnownMarketplaces — live in
~/.claude/settings.local.json, which is already gitignored. Claude Code writes
those when you change model or theme via /config; keeping them out of the
tracked file stops this public repo from churning with local state or publishing
work-only marketplace entries.