macOS set-up notes (October 2017)Edit
Notes made getting a re-imaged machine set-up (running macOS Sierra; the previous High Sierra install imploded).
These are mostly linear in nature, but there was some parallelism and back-and-forth involved because the Arq backup restore took over 24 hours to complete, so while that was happening I was going back to earlier items and augmenting them.
- 
Switch to Colemak.
 - 
Turn off System Preferences → Keyboard → Shortcuts → Input Sources → Select the previous input source (Control-Space).
 - 
Accepted proposed software updates.
 - 
Trash unwanted corp-installed welcome document on Desktop.
 - 
Drag off unwanted Dock icons (Siri, Launchpad, Dashboard, Safari, Firefox, System Preferences, IT Technical Support, Cisco AnyConnect, Maps, Photos, iBooks).
 - 
Set-up dotfiles repo.
mkdir code cd code git clone --recursive https://github.com/wincent/wincent cd wincent ./install- Hombrew install seems to hang. Control-C it to get better visibility.
 - Attempt cleanup 
brew cleanupto release locks (er, no, doesn’t work;brew doctordoesn’t either). cd ~/code/wincent/roles/homebrew/files && brew bundle- Seeing as it got interrupted, 
./install shell(and thenchsh). - Then 
./install vim(ugh, permissions issues throughout, requiring numeroussudo chown -R; I suspect the in-progress Arq backup is futzing with the permissions). ./install defaults./install ssh(can’t run this until backup is done — or rather, until GPG keys are on the disk — because we need to decrypt the encrypted files in the repo in order to do it)../install cron./install misc- And follow-up to this one, from 
roles/misc/filesset upuser-icon.pngby drag-and-drop into Users & Groups preference pane. 
- And follow-up to this one, from 
 
 - 
Add Activity Monitor to Dock:
- Set to Open at Login.
 - Set to show CPU History in Dock icon.
 
 - 
Log in to App Store:
- Install apps: Todoist, ScreenFlow 6, Monodraw, Fantastical 2, Marked 2, Textual 6, Relax Melodies Premium, Twitter, Transmit, Kindle, Net Monitor, xScope, Skitch, Keynote.
 
 - 
Add to Dock and set to Open at Login:
- Net Monitor
 - Todoist
- Turn off Menu Bar icon.
 
 - Fantastical 2
- Add iCloud (probably don’t need this) using app-specific password in 1Password.
 - Add Office 365 account (work).
 - Add Google account (personal).
 - Turn off Menu Bar icon.
 - Under Preferences → Calendars customize items in the default calendar set (can omit most of them).
 
 
 - 
Set up 1Password (requires "Secret Key" — previously known as "Account Key"):
- Also install browser extension (you should be prompted to do this during set-up, but if not, see: https://agilebits.com/onepassword/extensions).
 
 - 
Restore from Arq backup:
- Launch installed app (installed via Homebrew).
 - Enter license key (from 1Password).
 - Add AWS backup destination using info from 1Password, re-use existing bucket.
 - Add Google Drive destination.
- Choose "Do NOT use Appdata Folder" (because that wasn’t an option when I originally set up).
 
 - Start the restore by finding the last backup, clicking the home folder and clicking "Restore…" and "Overwrite…".
 - Preferences (not sure if these will come through anyway with the restore):
- Back up using administrator privileges
 - Show hidden files in file selection dialog
 - Include file list in backup logs and email reports
 
 
 - 
Sign in to Chrome.
- NOTE: This obviates the need to turn off unwanted default corp search engine, or install 1Password extension (seems I have two versions installed: need to uninstall one of them; will keep the beta I guess).
 
 - 
Turn on Night Shift (System Preferences → Displays → Night Shift).
 - 
Set-up hot-corners (System Preferences → Desktop & Screen Saver → Screen Saver → Hot Corners…)
 - 
Launch Karabiner-Elements (not sure if Homebrew does this already, but check it anyway).
 - 
Launch Hammerspoon:
- Enable accessibility features.
 - Launch Hammerspoon at login (on)
 - Show Dock icon (off)
 - Keep console window on top.
 
 - 
Manually install Adobe Source Code Pro by copying from roles/fonts/files.
- Some follow-up needed though (prefs in iTerm); will see if they come down with backup restore or not.
 
 - 
Make Colemak the default layout (hm, didn’t seem to work): see: https://wincent.dev/wiki/Making_Colemak_the_default_layout_at_the_OS_X_login_prompt
 - 
Clone corporate repos.
 - 
iTerm:
- Move cursor to the front of line
- ⌘+← Send Hex Codes: 0x01
 
 - Move cursor to the end of line
- ⌘+→ Send Hex Codes: 0x05
 
 - Move cursor one word left
- ⌥+← Send Hex Codes: 0x1b 0x62
 
 - Move cursor one word right
- ⌥+→ Send Hex Codes: 0x1b 0x66
 
 
 - Move cursor to the front of line
 - 
arc install-certificate(needed to do anything useful with arc). - 
Manually run through prefs (can’t be bothered waiting for backup restore to finish).
- System Preferences → Dock → Automatically hide and show the Dock.
 
 - 
Download and install https://github.com/chrstphrknwtn/epoch-flip-clock
 - 
Launch and set up Dropbox.
 - 
Manually restore
~/.gnupgand~/.ssh— want access to keys (note: can do this even though another restore is already running); then:- 
gpg --list-secret-keyscan’t see old keys… this is a gpg2 vs gpg thing:brew install gpg1 gpg1 —list-secret-keys # works gpg1 —export-secret-keys > v1-secret-key.export gpg1 —export > v1-public-key.export gpg —import v1-public-key.export v1-secret-key.export gpg —list-secret-keys # now works gpg —list-public-keys # now works rm v1-public-key.export v1-secret-key.export - 
In dotfiles repo:
vendor/git-cipher/bin/git-cipher decrypt 
 - 
 - 
Restore
~/Library/Preferences(too sick of waiting for full restore to finish) - 
Set up passage:
go get github.com/wincent/passage (http://github.com/wincent/passage) go get github.com/keybase/go-keychain (http://github.com/keybase/go-keychain) sudo cp $(which passage) /usr/local/bin/ launchctl load -w -S Aqua ~/Library/LaunchAgents/com.wincent.passage.plist (that file already on disk, restored from backup)- Need to restore items from backup keychain:
- Restore from Arq to 
~/Backups/Keychains/ - Rename to 
2017-10-09-login.keychain-db - Add to Keychain Access and unlock
 - Recreate items in the main keychain rather than copying them across (sick of the "test item" name that I can’t change); there are 4 items, listed in my dotfiles repo README.
 
 - Restore from Arq to 
 
 - Need to restore items from backup keychain:
 - 
Run Alfred (settings came in via Backup)
- Disable Spotlight shortcut in System Preferences → Keyboard → Shortcuts → Spotlight → Show Spotlight search
 
 - 
Run Bartender; settings came in via Backup, except for:
- Preferences → General → Launch Bartender at Login
 
 - 
Run iStat Menus (settings came in via Backup)
 - 
sudo chown -R $USER:"$(id -gn $USER)" $HOME(quotes because of bogus space in Active Directory group name)- After this, retry installing Safari 1Password extension (works).
 
 - 
Set desktop pic to High Sierra (restored from backup).
 - 
Add Corpus release and debug builds to Dock
 - 
Re-auth Kindle app, and log in to Amazon to delete old device.
 - 
Reboot to flush out remaining issues
 - 
Set Hammerspoon to launch at login (again)
 - 
Get mail search history working again:
rm -rf ~/mutt/tmp/notmuch.history(was a directory full of files; causedIOError: [Errno 21] Is a directory; this system has a different version or readline it seems) - 
Unbreak Markdown mail sending (was gracefully degrading):
cd ~/.mutt/scripts gem install bundler bundle install - 
Finalize Arq set-up:
- Adopt Arq backup sets
 - Schedule daily backups
 - Set up email updates
 - Set up exclusions in Time Machine (see exclusion list in Corpus, "Arq backup notes")
 - Back up only on selected devices, selected networks.
 
 - 
Boot Isolator and set it to launch at login.