Building a happy MacOS workstation with all the things.
System Ruby, Homebrew, and Homebrew Bundle do the heavy lifting. But there is some lightweight Ruby-based shell scripting as well.
- MacOS Catalina or later
- Internet is connected
- Have a clean install of MacOS
- Run Terminal
- Run the following to bootstrap
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/infews/workstation_repave/main/bin/bootstrap)"
...and watch the prompts
- Populate the file
~/.system_name
with the name you want for this computer - Run
bin/repave
to finish (See customization below)
The bin/bootstrap
script will do the following:
- Install XCode's command line tools, which includes
git
- Make the
~/workspace
directory (for all your coding projects) - Clone this repo into
~/workspace
- Prompt you to run the follow-on script
The bin/repave
script runs the remaining tasks, relying heavily on Homebrew to finish the automatable tasks.
- The repo is cloned locally
- Anything that can be installed via Homebrew, will be installed via Homebrew Bundle with the Brewfile in
assets/Brewfile
- Any dotfiles for various apps live in
dotfiles
are managed and symlinked withrcm
- Git is configured by generating a
.gitconfig
that includesassets/gitinclude
- This is because Git won't load a symlinked dotfile
- Run other, personal tasks that live in
lib/repave
Yes, you will want to customize this repo.
- Fork this repo and customize
- Everyone is going to have different preferences and apps
- Consciously not extracting a grand unifying thing yet
- Assets
- Update
assets/Brewfile
for all your installable apps (Homebrew, casks, mac apps)assets/Brewfile
to be used always
- Update
assets/gitinclude
for git aliases & id's.gitconfig
cannot be managed byrcm
, so we build it at install time
- Update
- Dotfiles
- Dotfiles live in
dotfiles
, without prepended dots per RCM convention- RCM is installed (via Homebrew) to manage the dotfiles
- See
dotfiles/rcrc
for which files are excluded
- Useful defaults based on how repave works live in
zshrc
; Put anything you-specific inzshrc
- Dotfiles live in
- Add any other personal executable scripts to
bin
dotfiles/zshrc
adds~/bin
to the$PATH
- Make your own tasks
- Add new Ruby classes in
lib/repave
to do work (see examples) - Edit/add any task classes to
bin/repave
- Add new Ruby classes in
- Why not just do this with shell scripts?
- Because I can never debug shell scripts. So Ruby FTW.
- Why not Ansible?
- Ruby FTW.
- Please make any tasks idempotnent. The
repave
script is meant to be run often. - Please do not add any external dependencies. This is meant to be run on a fresh MacOS very simply.