Migrating to a new Mac is a pain. To alleviate that, this repository automates a bunch of the steps involved so there's way less to do manually. Forked from driesvints/dotfiles (handy blog post) - thanks Dries.
- Homebrew + Homebrew Bundle - does the heavy lifting. Homebrew Bundle installs the resources listed in the accompanying Brewfile, using one of the following commands:
- tap - a repository of formulae (things to install)
- brew - a binary to install, e.g. git
- cask - a MacOS app to install, e.g. Figma <= most apps are installed this way
- mas - an AppStore app to install
- .zshrc - handy shell settings
- Mackup - synchronises app settings to Dropbox
- .macos - shell script configuration file that sets a bunch of system settings & preferences, e.g. hot-corners, scroll preferences, etc.
Assuming your dotfiles are already set up, start here. (Instructions on setting dotfiles for the first time are below.)
- Commit and push any changes/branches to your git repositories
- Save all important documents from non-iCloud/Dropbox directories
- Export data from any local databases
- Update mackup to the latest version -
brew upgrade mackup
- and runmackup backup
-
If your 'new' machine is actually a macOS re-install over your old machine follow these steps.
-
Update macOS to the latest version with the App Store
-
Git clone this repo to
~/.dotfiles
-
Install X-Code command-line tools (might already be handled by the previous step):
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress; softwareupdate -i -a rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
-
Copy your public and private SSH keys to
~/.ssh
and make sure they're set to600
-
Grant full disk access to Terminal and/or iTerm so that it can actually update OS / application preferences using the
defaults
command. -
Run
install.sh
to start the installation -
Login to Dropbox and get it sync-ing. Mackup needs Dropbox available to read the backed-up application settings.
-
Restore preferences by running
mackup restore
At this point all the dotfile wizardry is complete. You now have to resume the tedious mop-up of manual steps...
- Restart your computer and launch all the apps you've just installed. Click lots of 'I accept' buttons.
- Firefox - Backup and restore your current profile.
- Chrome - Chrome automatically syncs tabs, extensions, etc between different Chrome instances. Restoring tabs doesn't happen automagically between machines though (which kinda makes sense to be fair). To restore tabs in the new Chrome instance go to
History (⌘Y) > Tabs from other devices (top left menu) > Dots (top right menu) > Open all. - Enable email accounts (System preferences > Internet accounts) and start syncing email.
- Set desktop backgrounds and screensaver (Aerial is awesome).
- Install hardware drivers, e.g. RME Babyface
If you want to start with your own dotfiles from this setup, it's pretty easy to do so. First of all you'll need to fork this repo. After that you can tweak it the way you want.
The instructions below assume you already have set up Oh My Zsh so make sure to first install Oh My Zsh before you continue.
Go through the .macos
file and adjust the settings to your liking. You can find much more settings at the original script by Mathias Bynens and Kevin Suttle's macOS Defaults project.
Check out the Brewfile
file and adjust the apps you want to install for your machine. Use their search page to check if the app you want to install is available.
Check out the aliases.zsh
file and add your own aliases. If you need to tweak your $PATH
check out the path.zsh
file. These files get loaded in because the $ZSH_CUSTOM
setting points to the .dotfiles
directory. You can adjust the .zshrc
file to your liking to tweak your Oh My Zsh setup. More info about how to customize Oh My Zsh can be found here.
When installing these dotfiles for the first time you'll need to backup all of your settings with Mackup. Install Mackup and backup your settings with the commands below. Your settings will be synced to iCloud so you can use them to sync between computers and reinstall them when reinstalling your Mac. If you want to save your settings to a different directory or different storage than iCloud, checkout the documentation.
brew install mackup
mackup backup
You can tweak the shell theme, the Oh My Zsh settings and much more. Go through the files in this repo and tweak everything to your liking.
Enjoy your own Dotfiles!
I first got the idea for starting this project by visiting the Github does dotfiles project. Both Zach Holman and Mathias Bynens were great sources of inspiration. Sourabh Bajaj's Mac OS X Setup Guide proved to be invaluable. Thanks to Taylor Otwell for his awesome Zsh theme! And lastly, I'd like to thank Maxime Fabre for his excellent presentation on Homebrew which made me migrate a lot to a Brewfile
and Mackup.
In general, I'd like to thank every single one who open-sources their dotfiles for their effort to contribute something to the open-source community. Your work means the world! 🌍 ❤️