This repo contains my dotfiles, terminal configs, a "manifest" of apps that should be installed on my system and an installation script to make the process of setting up a new computer as seamless as possible.
If you have a working computer, make sure you first go through this checklist before reinstalling everything from scratch...
- commit and push changes/branches to your git repos
- save/backup all important documents from non-iCloud directories
- save all your work from apps which aren't synced through iCloud
- export important data from your local databases
- update mackup to the latest version and run
mackup backup(macOS only)
The ./install script detects the platform (uname) and runs the right
combination of configs, so the first four steps are the same everywhere.
# 1. Update macOS to the latest version with the App Store
sudo softwareupdate -i -a
# 2. Copy your public and private SSH keys to ~/.ssh and make sure they're set to 600
chmod 600 <name_of_the_key>
# 3. Clone this repo to ~/.dotfiles
cd ~; git clone git@github.com:marcaube/dotfiles.git .dotfiles
# 4. Run the install script
cd ~/.dotfiles; ./install; cd -
# 5. Login with your Apple ID, check iCloud Drive and let it sync for a while
# 6. Restore preferences
mackup restore
# 7. Check that homebrew installations are A1
brew doctor
# 8. Restart your computer to finalize the process
shutdown -r nowThe Apple-specific steps (App Store update, iCloud, mackup) don't apply.
./install installs the apt prerequisites it needs (build tools, zsh,
xclip/wl-clipboard, …) and Linuxbrew, then symlinks everything.
# 1. Update the system
sudo apt update && sudo apt upgrade
# 2. Copy your SSH keys to ~/.ssh and make sure they're set to 600
chmod 600 <name_of_the_key>
# 3. Clone this repo to ~/.dotfiles
cd ~; git clone git@github.com:marcaube/dotfiles.git .dotfiles
# 4. Run the install script
cd ~/.dotfiles; ./install; cd -
# 5. Log out and back in so the new login shell (zsh) takes effectTo pull the latest changes from the repo and update your setup.
# 1. Move into the dotfiles directory
dotfiles
# 2. Pull the changes from master
git pull
# 3. Reload the configs
reload
# 4. Restore preferences (macOS only)
mackup restoreTo add git credentials, custom commands, or private aliases, you should create
a zsh/extra.zsh file. This file is going to be picked up by ZSH but ignored
by git. You can use this file to add stuff you don't want to commit to a public
repository.
For example, that's where you could define your GIT_AUTHOR_NAME and
GIT_AUTHOR_EMAIL.
- cross-platform: works on macOS (Apple Silicon) and Debian/Ubuntu Linux — the
./installwrapper layers an OS-specific Dotbot config on top of a shared one, and the shell config branches at runtime viazsh/lib/os.zsh - sensible
macosconfigs, see this repo for more options - split Brewfiles:
brew/Brewfile.common(cross-platform CLI tools) andbrew/Brewfile.darwin(macOS casks + Mac App Store apps), see the caskroom for more - an
aliases.zshfile with a bunch of useful aliases and functions- CLI app launchers
- encoding and crypto utility functions
- an
updatealias to update macOS, mac app store apps, Homebrew binaries and Cask apps - a
weatherfunction to get weather reports from wttr.in - and much more...
- a
.zshrcfile to tweak my Z shell config - most app settings synced with iCloud via Mackup
gitconfigis my git configurationsgitignore_globalis a list of files and extensions that should be globally ignored by gitmackup.cfgis the Mackup configuration, to sync app settings using iCloud instead of Dropboxmacos.shcontains my macOS preferenceszshrccontains my Z shell config (plugins are sourced directly, no Oh My ZSH)aliases.zshdefines a list of useful CLI aliases, shortcuts and functionsbrew/Brewfile.commonandbrew/Brewfile.darwinlist the binaries (homebrew) and apps (cask and mas) I want installedexports.zshcontains thePATHenv variable configszsh/lib/os.zshdetects the platform and exposesis_macos/is_linuxso the rest of the shell config can branchzsh/aliases.darwin.zsh/zsh/aliases.linux.zshhold the platform-specific aliases (sourced asaliases.${OS}.zsh)zsh/extra.zshis a file ignored by git where you can add your git credentials, custom commands, private aliases, etc.installis the installation script to make this all work "automagically"install.conf.common.yamlplusinstall.conf.darwin.yaml/install.conf.linux.yamlare the Dotbot configsinit.luais my Neovim entry point — modular config undervim/lua/, plugins managed by lazy.nvim
- Mathias Bynens' dotfiles
- Dries Vints' dotfiles
- Sourabh Bajaj's macOS Setup Guide
- A practical guide to securing macOS