Workstation Repave
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.
Assumptions
- MacOS Catalina or later
- Internet is connected
First
- 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)
What's Happening?
bin/bootstrap
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
bin/repave
The bin/repave
script runs the remaining tasks, relying heavily on Homebrew to finish the automatable tasks.
But Really, What's Happenning?
- The repo is cloned locally
- Anything that can be installed, will be in
assets/Brewfile
- All the dotfiles in
dotfiles
are managed and symlinked withrcm
- Gitconfig is included (separately because git)
- Run other, personal tasks
How to Customize for You
Yes, you will want to customize this repo.
- Fork this repo and customize
- 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
- 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
FAQ
- Why not just do this with shell scripts?
- Because I can never debug shell scripts. So Ruby FTW.
- Why not Ansible?
- Ruby FTW.
Contributing
- 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.