This repository contains a series of automated customizations that help me personalize and maintain my Mac.
Special thanks to Zack Holman and Dries Vints for the inspiration that led to what you see within this repository. In many instances, what I have here is a direct copy of their work.
Odds are you are migrating from an existing machine to another or you are setting up an additional computer that will match the setup of another. Before getting started, ensure you have a fresh backup of all of your data and settings.
- Commit and push any pending changes within local git repositories
- Move any important documents into cloud-based storage
- Save all of your work within apps that do not sync to the cloud
- Export any important data from you local (MySQL) database
- Update your mackup to the latest version and run
mackup backup
If you are setting up a new machine, odds are macOS is already up-to-date. However, check System Preferences on the new machine and install any pending updates.
We will need an SSH key to communicate with GitHub. Generate a new public and private SSH key by running the following command:
curl https://raw.githubusercontent.com/dascentral/dotfiles/HEAD/ssh.sh | sh -s "<your-key-name>"
Let's go ahead and clone this repository. I prefer to store its contents within the ~/.dotfiles
.
Note that issuing your first git
command will prompt installation of the Xcode Command Line Tools. Go grab a coffee/snack/meal while that download and install takes place.
git clone git@github.com:dascentral/dotfiles.git ~/.dotfiles
The following script installs and configures most of the software that I use on a new machine.
~/.dotfiles/install.sh
If you dig into that installation file, you'll note that it does a few things:
- Installs and configures Oh My Zsh
- Installs Homebrew, the Missing Package Manager for macOS (or Linux)
- Executes
brew bundle
which installs the bulk of the software - Ensures Composer is up-to-date and installs all global packages
- Configures several applications
Installing or configuring node/NVM via Homebrew is not advised as outlined here.
Please note that upstream has asked us to make explicit managing nvm via Homebrew is unsupported by them and you should check any problems against the standard nvm install method prior to reporting.
Instead, per the NVM docs, run this:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
I have a dotfiles
script that I run regularly to keep the machine up-to-date. More details to come.
I need to give this information a scrub. More to come.
I've yet to nail automated installation of every piece of software on my machines. The following will need to be installed manually.
- 4K Video Downloader
- Apache Directory Studio - Requires JDK8
- Aurora HDR 2018
- Charles Proxy
- Dash
- Egnyte Connect
- Sonos
The .macos
file within the root of the repository attempts to automatically configure as many system settings as possible. I haven't nailed them all, but this script takes on a good chunk of the work.
source .macos
A computer restart will likely be necessary after executing that command.
I was introduced to the "dotfiles" concept by Zack Holman. Initially, I forked his repo for my own use but quickly realized I did not understand much of what was going on. So, instead of simply copying his work, I decided to start from scratch and slowly add functionality so that I could better understand what Zack or others have done.
If you're interested in the philosophy behind why projects like these are awesome, you might want to read Zack's post on the subject.
The following articles and repositories may provide additional inspiration as you setup your own dotfiles repository.
- Dotfiles Are Meant to Be Forked — Zack Holman, Aug 2010
- Getting Started with Dotfiles — Dries Vints, April 2016
- dotfiles.github.io — Your unofficial guide to dotfiles on GitHub
- Dries Vints
- Fabio Ivona — Linux-focused for those managing servers
- Freek Van der Herten's
- Mathias Bynens
- Matt Stauffer
- Michael Dyrynda
- Zach Holman
Gatekeeper is a security feature of macOS. Some of the software installed via the Brewfile
is published by what Apple considers "unidentified developers."
You can circumvent the security feature by disabling Gatekeeper.
sudo spctl --master-disable
If you run this command, be sure to only open software from sources that you trust. You can always turn it back on after installing a restricted software application.
sudo spctl --master-enable
Do you own an HP LaserJet 1020 like me? If so, you'll need to get the drivers from Apple.
https://support.apple.com/kb/DL1888?viewlocale=en_US&locale=en_US
While I have automated many of my macOS system configurations via the .macos
file, I still have a number of manual modifications that I make following setup of a new machine. My goal is always to limit the amount of manual work. This article helped me understand how to automate application settings:
https://pawelgrzybek.com/change-macos-user-preferences-via-command-line/
Print all domains
defaults domains | tr ',' '\n'
Print settings for a specific app
defaults read [domain]
defaults read com.googlecode.iterm2
Print specific key
defaults read [domain] [key]
defaults read com.googlecode.iterm2 PrefsCustomFolder
Write new settingss
defaults read [domain] [key] [type] [value]
defaults write com.apple.Notes NotesContinuousSpellCheckingEnabled -bool true