Bootstrap my macOS machines, for fun & profit. Now supports Github Codespaces!
Dotfiles are meant to be forked, but mine isn't. This script installs many things you won't use.
git clone https://github.com/narze/dotfiles ~/dotfiles
cd ~/dotfiles && make bootstrap
# Optional : Change to SSH url for pushing updates
git remote set-url origin [email protected]:narze/dotfiles.git
After the recent drama with Zinit, I decided to give Fish a try, it is good but I also want to still maintain my Zsh configuration. I migrated the settings to zsh4human which is maintained by the one who made Powerlevel10k. It's 2-3x faster than Zinit as of now.
I'll separate the dotfiles script to install zsh or fish separately to save some space. You also install both like mine.
Here are the list of issues I've found on running the script on M1 Macbooks (Tested on both Macbook Air & Macbook Pro)
-
dotbot/brew fails silently : Now they need XCode to be installed first (via App Store), rather than just XCode CLTSeems to be fixed now -
Kitty.app installing binaries from Homebrew does get you x86, now you have to Build from source-
ghq get -l kovidgoyal/kitty /opt/homebrew/bin/python3 setup.py kitty.app # Needs python3 from brew cp -r kitty.app /Applications/kitty.app # Replace CLI rm /opt/homebrew/bin/kitty ln -s $PWD/kitty/launcher/kitty /opt/homebrew/bin/kitty
-
If you want both versions, download the executable and rename it (
kitty_x86.app
)
-
-
Docker for Mac : Replace with Tech Preview version -
Some brew/asdf packages cannot be installed on arm64See "Apple Silicon specific commands" -
Setup both versions of Homebrew, then use shell script to point to the correct
brew
# Install both versions arch -arm64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # .zshrc if [ "$(uname -m)" == "arm64" ]; then # Use arm64 brew, with fallback to x86 brew if [ -f /opt/homebrew/bin/brew ]; then export PATH="/usr/local/bin${PATH+:$PATH}"; eval $(/opt/homebrew/bin/brew shellenv) fi else # Use x86 brew, with fallback to arm64 brew if [ -f /usr/local/bin/brew ]; then export PATH="/opt/homebrew/bin${PATH+:$PATH}"; eval $(/usr/local/bin/brew shellenv) fi fi
-
Rubygems : Specific bundler config is needed (See
bundle config
) -
Yabai : Cannot use space switch commands (eg.
yabai -m space --focus 1
) even if SIP is disabled
make brew-x86
: Install packages which cannot be instaled witharm64
arch right now (eg.Both are now supported!)kubectl
,kubectx
- Login to App Store before running
make brew
(It runsmas
which needs App Store permission.) - Preferences -> Change input source switch to CMD+Space, and Spotlight search to Option+Space
asdf
needs shell reloading once after installation. Run setup commandmake asdf
once, open a new terminal, then runmake asdf
again.- Run
mackup restore
once after Syncthing is installed and~/Sync/Mackup
is synced. - Connect to Zerotier private network to mount NAS
- Setup Arq for backup
- Disable Boom 3D Keyboard Shortcuts
- Disable Timing Shortcut
$ make
help Print command list
bootstrap Bootstrap new machine
dotfiles Update dotfiles
macos Run macos script
code Clone Repositories with ghq
brew Install brew & cask packages
brew-light Install light version of brewfile (Minimal)
brew-x86 Install x86-compatible Homebrew packages (Expected to Apple Silicon Macs)
tools Install non-brew tools eg. tmux package manager
asdf Install asdf-vm
sync Sync local configuration from Google Drive, Dropbox, etc.
update Update everything
vim Setup vim
all Run all tasks at once
- Homebrew
- Homebrew Cask
- Mas
- zsh with zsh4humans
- fish with fisher
- asdf with Ruby & Node.js
- tmux
- macOS defaults
- Actual dotfiles
- ~/Code for workspace with public repos
- etc.