annashipman / mac_setup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting up a new Mac

NB Suited is no longer maintained, could use Steve's mac_setup

For use with suited.

Manual steps before suited

  1. Install and set up 1Password

Installing suited and initial setup

  1. Create a new SSH key for the new device and add it to the ssh-agent.
ssh-keygen -trsa -b4096 -C "$GIT_EMAIL" -f ~/.ssh/id_rsa
chmod 400 ~/.ssh/id_rsa
ssh-add ~/.ssh/id_rsa

As of MacOS Sierra, you also need to modify ~/.ssh/config.

Host *
 AddKeysToAgent yes
 UseKeychain yes
 IdentityFile ~/.ssh/id_rsa
  1. Add it to GitHub.

To get it to the clipboard: cat ~/.ssh/id_rsa.pub | pbcopy.

  1. Check whether you want full disk encryption (probably yes for own computer, no for shared computer, see this commit)

  2. Run suited initial set-up. (This will also check out the mac_setup repo.)

curl -O https://raw.githubusercontent.com/norm/suited/master/suited.sh
bash suited.sh github:annashipman/mac_setup:initial_setup.conf

Note this will fail on the last command; currently reworking this but until then the workaround is to create the folders it wants and move suited there.

Subsequent use of suited and rest of setup

After installing:

Move to the mac_setup directory.

Run the rest of the setup:

MACOS_DEFAULTS_DIR=./macos/defaults suited main.conf

Notes:

You will need to log out and back in to see some of the Mac settings change.

Manual steps after suited

  1. Go to settings, security, turn off FileVault and then turn it on again and allow apple ID to unlock it. This is a manual step, pending rewriting how this all works.

  2. 'Dockutil' currently commented out; so manually remove everything from the dock except for Notes, Firefox, iTerm and Chrome.

  3. Right click on Dock, settings, can change size of icons and also uncheck 'show recent applications in Dock'

  4. Set iTerm to the right size (iTerm2 -> Settings -> Profiles -> Default -> Window -> Columns: 170, Rows: 42). Also, set Working directory to 'Reuse previous session's directory' (in General tab under Default profile) and turn off the bell for events such as auto-completion not available (In Terminal tab under Default profile -> Notifications -> Silence bell)

  5. Update github email address in .gitconfig.

  6. Set default shell back to bash. chsh -s /bin/bash

  7. Set caps lock to control (System settings -> keyboard -> keyboard shortcuts -> Modifier keys)

  8. Add a shortcut for strikethrough (System settings -> Keyboard -> Shortcuts tab -> App Shortcuts -> + -> ⇧⌘X)

  9. Set up notes, calendar, reminders to sync (System settings -> iCloud -> uncheck the things then select the things I want to synch. (Messages is automatic.))

  10. Notes: View -> Sort by -> Title

  11. Install Things from the Mac App store (go to my account, change who purchsed by) and log in (Things -> settings -> Things Cloud). Set it not to display number of items (settings -> General -> Badge count).

  12. Stop notifications - go through all apps and turn them off.

  13. Stop interface sounds (System settings -> Sounds -> uncheck interface sounds). This could probably be automated but I don't have time to figure out how right now.

  14. Install Firefox 1Password browser extension by copying file from computer.

  15. Stop Firefox showing recently visited pages (3 bar menu -> settings -> Home, update Homepage and New tabs).

  16. Stop Firefox offering to remember passwords (3 bar menu -> settings -> Privacy and security -> Forms and passwords make sure "Ask to save logins and passwords for sites" is unchecked.)

  17. Set default search to DuckDuckGo: about:preferences#search.

  18. Stop Chrome offering to remember passwords (Three dots menu -> Settings -> Passwords -> Unselect "Offer to save passwords"

  19. Set up my server. Put config into the ~/.ssh/config file (required config is in 1Password). Copy the new public key ( cat ~/.ssh/id_rsa.pub | pbcopy ), SSH to the machine as root and paste the new public key into Puppet, and then run puppet (puppet apply -v puppet/annajunior.pp). Note: need to remove entire comment at the end as Puppet doesn't like the whitespace.

  20. Add SSH key to Bitbucket (profile is hidden at the bottom left).

  21. Copy over required files from old computer: Pictures, Movies, in progress stuff in projects and if relevant, Desktop.

  22. Install backblaze. Can brew install --cask, but it downloads an installer that you then have to open, so this is a manual step, for now. Also set up Time MAchine back ups.

  23. Finally, install Ruby. This is a separate script as it takes AGES. Do when you're about to make a cup of tea.

suited ruby.conf

When connected to external keyboard

  1. Remap external keyboard keys (caps lock -> control, alt [option] -> apple [command], apple -> alt)

Optional

  1. Install Xcode - this can be done in the Brewfile but takes a long time so better to do manually via the AppStore when needed.

About


Languages

Language:Shell 68.6%Language:Ruby 31.4%