These dotfiles contain my provisioning script for setting up fresh MacOS devices. It is a modified fork of the structured dotfiles of Zach Holman.
This repository is designed to run on a completely clean machine, though that isn't necessarily a requirement. For best results, however, you should follow these instructions immediately after logging in and before manually installing anything else (except were asked to as part of the instructions).
Before running these dotfiles you'll need to do the following:
- Install git (you can do this on a new MacOS machine by typing "git" in terminal and doing whatever Apple tells you to do)
- Clone this repository to
~/.dotfiles
git clone https://github.com/slifty/dotfiles.git ~/.dotfiles
git remote set-url origin [email protected]:slifty/dotfiles.git
- Define local configuration settings
cd ~/.dotfiles
cp .env.template .env
cp local/config.json.example local/config.json
vi .env
vi local/config.json
- Source the configuration settings
source .env
From here you may want to take a moment to review the dotfiles:
- Applications in the
Brewfilethat are no longer relevant? - Applications in
macos/install.shthat you don't use any more? - Go through the
macos/set-defaults.shto see if you still like all of those settings.
Finally you can run the bootstrap script which will install everything:
cd ~/.dotfiles && ./bootstrap.sh
You can re-run ./bootstrap.sh whenever you feel inspired.
I suppose every step is optional, but this one really is. You can set up a series of MacOS defaults by running:
cd ~/.dotfiles/macos && ./set-defaults.sh
- Register the shiny new SSH key that the script generated in appropriate places
- GitHub
- Any necessary servers
- Install your GPG key:
# On the old machine...
gpg --list-secret-keys --keyid-format LONG
gpg --export --armor KEYID > private.key.asc
# Transfer the key securely
# On the new machine...
gpg -d private.key.asc > private.key
gpg --import private.key
rm private.key
Each folder is intended to cover an area of functionality of your computer (as Zach Holman said: topics). As you find new topics of functionality in your computing life you should just toss in a new root directory.
There are a few special files which exist in the root directory have a few special files.
- topic/*.zsh: Any files ending in
.zshget sourced into your environment. (Recommended prefixes: env, path, alias, hook) - topic/*.symlink: Any file ending in
*.symlinkgets symlinked into your$HOME(with.symlinkremoved). - topic/preinstall.sh: Any file named
preinstall.shis executed as part ofbootstrap.shbut BEFORE brew is invoked. - topic/install.sh: Any file named
install.shis executed as part ofbootstrap.sh.
There are also a few special files in the root directory:
- bin/: Anything in
bin/will get added to your$PATHand be made available everywhere. - Brewfile: This is a list of applications for Homebrew Cask to install.