This repo records the configuration of my Mac. It can be used to set up a new Mac and keep it up to date.
Files in the home directory are tracked using a bare git repository in ~/.setup
.
- Install command line tools
xcode-select --install
- Set up the bare repository in
~/.setup
git clone --bare https://github.com/jamesjoshuahill/setup-mac.git "$HOME/.setup/" alias setup-git='git --git-dir="$HOME/.setup/" --work-tree="$HOME"' setup-git config status.showUntrackedFiles no
- Update files in the home directory
setup-git checkout
- Run the setup script
~/bin/setup-mac
- Restart and re-run setup script to install all macOS updates
- Load iTerm preferences:
- Tick: General > Preferences > Load preferences from a custom folder or URL and select the
~/.iterm
directory. - Tick: General > Preferences > Save changes to folder when iTerm2 quits
- Tick: General > Preferences > Load preferences from a custom folder or URL and select the
- Rectangle preferences:
- Tick: Settings > Launch on login
- Flycut preferences:
- Tick: General > Launch Flycut at login
- Save GitHub credentials:
- Create a GitHub personal access token for the new Mac with the
repo
scope. - Run a git command on a private repo and enter GitHub credentials. They will be saved in the keychain.
- Create a GitHub personal access token for the new Mac with the
- System Preferences > Security > General
- Require password after '5 seconds'
- System Preferences > Desktop & Screen Saver > Screen Saver
- Start after '10 min'
- Hot corners: 'Start Screen Saver' (top right)
- System Preferences > Security & Privacy > General
- Show a message when the screen is locked
- System Preferences > Security & Privacy > FileVault
- Turn on FileVault...
Run the setup script regularly to update to the latest versions:
setup-mac
Check for changes to config:
setup-git status
Check in changes to tracked configuration:
setup-git add -p # stage changes
Track new configuration:
setup-git add NEW_FILE # track a new file
Commit and push:
setup-git commit -m "..."
setup-git push
ℹ️ You can use the Bash alias
s
forsetup-git
and the Git aliases for shorter commands:s st
,s add -p
.
Update the Atom package list:
update-atom-package-list # updates ~/.atom/packages.txt
Update the pinned versions in ~/bin/setup-mac
:
Update Sensible Bash in ~/.sensible
.