Your dotfiles are how you personalize your system. These are mine.
I love the new-macOS-smell that comes from a fresh erase-install of the latest os version every now and then, and especially when setting up a new machine. But, I seldom use backup and restore or migration because I want finer control over how the system is being setup.
When I worked at Apple I had a network share where I had a system_setup.sh script that set all my defaults, installed what I needed, and got me up and running in about 10-15 minutes. This is important when you're regularly re-installing the latest daily build of the OS.
This dotfiles repo is my attempt to re-create that but in a modern setting, based on the work from holman/dotfiles.
Run this to complete the bootstrap, install and setup:
git clone https://github.com/jdotw/dotfiles.git ~/.dotfiles
~/.dotfiles/bootstrap.shI structure my system setup into 4 phases with separate scripts:
./bootstrap.sh-- One-time install of things I need to kick start the rest of the setup process such as homebrew../install.sh-- One-time, but idempotent, install of software./setup.sh-- Idempotent application of the actual dotfiles, preferences, defaults writes, etc./update.sh-- On-demand update of homebrew and macOS software updates
Running bootstrap.sh will call install.sh, and install.sh will call setup.sh. This cascade completes your setup from running the bootstrap.sh script alone.
Everything's built around topic areas. If you're adding a new area to your forked dotfiles — say, "Java" — you can simply add a java directory and put files in there. Anything with an extension of .zsh will get automatically included into your shell. Anything with an extension of .symlink will get symlinked without extension into $HOME when you run script/bootstrap.
There's a few special files in the hierarchy.
- /install.sh: Any file named
install.shis executed when you run~/.dotfiles/install.sh. - /setup.sh: Any file named
setup.shis executed when you run~/.dotfiles/setup.sh. - /setup.sh: Any file named
update.shis executed when you run~/.dotfiles/update.sh. - bin/: Anything in
bin/will get added to your$PATHand be made available everywhere. - /*.zsh: Any files ending in
.zshget loaded into your environment. - /path.zsh: Any file named
path.zshis loaded first and is expected to setup$PATHor similar. - /completion.zsh: Any file named
completion.zshis loaded last and is expected to setup autocomplete. - /*.symlink: Any file ending in
*.symlinkgets symlinked into your$HOME. This is so you can keep all of those versioned in your dotfiles but still keep those autoloaded files in your home directory. These get symlinked in when you run~/.dotfiles/setup.sh.
I have not automated the following (yet):
- Backblaze install and setup (the cask doesnt work)
- Launch iStat Menus for initial setup
I want this to work for everyone; that means when you clone it down it should work for you. That said, I do use this as my dotfiles, so there's a good chance I may break something if I forget to make a check for a dependency.
If you're brand-new to the project and run into any blockers, please open an issue on this repository and I'd love to get it fixed for you!
I forked @holman's' excellent dotfiles to bootstrap my efforts with this. Thanks also to Kelvin for making me aware of the dotfiles notion.