Skip to content
npearson72Public

About

OSX Builder using Ansible

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

679 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started

1. Clone repo to home directory

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

2. Setup an .env file

cp .env_example .env

3. To install

To install everything

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).

To install specific features

sh ./install.sh --tags x,y,z

4. Install Alacritty manually

Homebrew disabled the Alacritty cask (it fails the macOS Gatekeeper check), so it has to be installed by hand.

  1. Download the latest .dmg from https://github.com/alacritty/alacritty/releases
  2. Drag Alacritty.app into /Applications
  3. Clear the quarantine flag so macOS will open it:

xattr -dr com.apple.quarantine /Applications/Alacritty.app

  1. Re-run the alacritty role to link the config:

sh ./install.sh --tags alacritty

5. Install languages with asdf

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.

6. Set up the 1Password SSH agent

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.

  1. Open 1Password and sign in
  2. Go to Settings > Developer and turn on Use the SSH agent
  3. (Optional) On the same screen, turn on Integrate with 1Password CLI so op unlocks with Touch ID
  4. Make sure your SSH key lives in your Personal or Private vault (the agent only offers keys from those by default)
  5. Add the public key to GitHub twice: once as an Authentication key and once as a Signing key
  6. Copy the public key into .env, wrapped in quotes because it contains spaces:

GIT_SIGNING_KEY="ssh-ed25519 AAAA..."

  1. Re-run the git role so commits get signed:

sh ./install.sh --tags git

  1. 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.

7. Work machine: wired only

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.

To brew bundle / brew cleanup

brew_bundle

brew_cleanup

Base Ansible command

ansible-playbook ansible/main.yml -i ansible/hosts -v -K

About

OSX Builder using Ansible

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages