Dotfiles are files and folders on Unix-like systems starting with .
that control the configuration of applications and shells on your system.
The dotfiles here include my personal:
- aliases
- shell config
- Brewfile
There are two intended usage scenarios:
-
GitHub Codespaces. Any new Codespace that I start runs
setup.sh
on initialization, which just copies my.bashrc
into the dev container. Other terminal-based configurations are skipped, since Codespace workflows are centered on VS Code. -
Personal Mac. I run
dotfiles.sh
to clone and source my dotfiles on my Mac, whether to bootstrap a new one or get a fresh start on an old one.
Prerequisites (instructions below)
- Install Apple CLT
- Connect to GitHub
- Clone dotfiles repo
xcode-select --install
- Press
Enter
when prompted for file name. - Enter passphrase for key.
ssh-keygen -t ed25519 -C "50999401+cmdecker95@users.noreply.github.com"
ssh-agent -s
cat <<EOL > ~/.ssh/config
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
EOL
ssh-add -K ~/.ssh/id_ed25519
pbcopy < ~/.ssh/id_ed25519.pub
- GitHub > Settings > SSH and GPG keys > New SSH key
- Click Add SSH key and enter passphrase.
git config --global user.name "Christian Decker"
git config --global user.email "50999401+cmdecker95@users.noreply.github.com"
git clone https://github.com/cmdecker95/.dotfiles.git ~/.dotfiles
brew bundle --file ~/.dotfiles/Brewfile install
# Sync tmux
rm -rf ~/.tmux.conf
ln -s ~/.dotfiles/.tmux.conf ~/.tmux.conf
# Sync starship
rm -rf ~/.config/starship.toml
mkdir -p ~/.config
ln -s ~/.dotfiles/starship.toml ~/.config/starship.toml
# Sync zsh
rm -rf ~/.zprofile
rm -rf ~/.zshrc
ln -s ~/.dotfiles/.zprofile ~/.zprofile
ln -s ~/.dotfiles/.zshrc ~/.zshrc