logo

whjc's Dotfiles

1. Make sure you have a system python configured

Ensure Apple's command line tools are installed (xcode-select --install to launch the installer).

  • Run the following command to add Python 3 to your PATH: export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH"
  • Upgrade Pip: sudo pip3 install --upgrade pip
  • Install Ansible: pip3 install ansible

2. Clone dotfiles repo

git clone https://github.com/williamhjcho/dotfiles ~/dotfiles

3. Run the ansible playbook

From inside ansible/ dir

# installs the required roles
ansible-galaxy install -r requirements.yaml

# run the playbook
./install.sh

4. Manual settings

Secrets

  • Create/copy the .env.personal secrets file into ~/.env.personal

System Preferences

  • Keyboard > Modifier Keys > Caps to Left Ctrl

Iterm2

  • Set ~/dotfiles/iterm2/ as the default profile path
  • Import iterm2/Profiles
  • Import iterm2/KeyBindings

SSH setup

ssh-keygen -t ed25519 -C "your_email@example.com"

# start ssh-agent in the background
eval "$(ssh-agent -s)"

edit ~/.ssh/config to load keys & store in keychain

Host github.com
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519
# add the ssh to the agent
ssh-add --apple-use-keychain "~/.ssh/id_ed25519"

Add the new SSH public key to GitHub (it can be used for both authentication and signing)

Test if the SSH is working

ssh -T git@github.com

Post setup

  • Install latest node nvm install node
  • Install latest python pyenv install 3.12 (also re-setup ansible dependencies, i.e. pip)

5. Everyday usage

Initialize tmux with pre-configured session: ./dotfiles/bin/tmux.sh