git clone https://github.com/npearson72/dots.git ~/.dots && cd ~/.dots
Note: Once you've cloned with https to reset the git remote url to ssh do:
git remote set-url origin git@github.com:npearson72/dots.git
cp .env_example .env
sh ./install.sh
Note: On a brand new machine the first run stops early, right after the zsh role sets up your .zshrc. Restart your terminal, then run sh ./install.sh again to finish the rest (neovim, mac_os, post_build).
sh ./install.sh --tags x,y,z
Homebrew disabled the Alacritty cask (it fails the macOS Gatekeeper check), so it has to be installed by hand.
- Download the latest
.dmgfrom https://github.com/alacritty/alacritty/releases - Drag
Alacritty.appinto/Applications - Clear the quarantine flag so macOS will open it:
xattr -dr com.apple.quarantine /Applications/Alacritty.app
- Re-run the alacritty role to link the config:
sh ./install.sh --tags alacritty
Neovim needs Node for coc.nvim and copilot.vim, so at minimum install nodejs.
asdf plugin add nodejs
asdf install nodejs latest
asdf set --home nodejs latest
Repeat for any other languages you need (ruby, python, lua, terraform, terraform-ls). Each asdf set --home writes the version to ~/.tool-versions.
The playbook installs 1Password, points ~/.ssh/config at its SSH agent, and tells git to sign commits with op-ssh-sign. The rest has to be done by hand in the 1Password app.
- Open 1Password and sign in
- Go to Settings > Developer and turn on Use the SSH agent
- (Optional) On the same screen, turn on Integrate with 1Password CLI so
opunlocks with Touch ID - Make sure your SSH key lives in your Personal or Private vault (the agent only offers keys from those by default)
- Add the public key to GitHub twice: once as an Authentication key and once as a Signing key
- Copy the public key into
.env, wrapped in quotes because it contains spaces:
GIT_SIGNING_KEY="ssh-ed25519 AAAA..."
- Re-run the git role so commits get signed:
sh ./install.sh --tags git
- Check that it works:
ssh -T git@github.com
If GIT_SIGNING_KEY is left empty, commit signing stays off so commits don't fail.
When COMPUTER_USE=work, the mac_os role turns off Wi-Fi and Bluetooth, turns off the automatic time zone, and sets the time zone to time_zone (in ansible/roles/mac_os/defaults/main.yml).
Location Services is protected by macOS and can't be scripted, so turn it off by hand in System Settings > Privacy & Security > Location Services.
brew_bundle
brew_cleanup
ansible-playbook ansible/main.yml -i ansible/hosts -v -K