Skip to content

whatyouhide/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles 🥑

Installation

These instructions are to be followed when installing these dotfiles on a new machine. Do these steps:

  1. XCode: If running on a Mac, you need part of XCode. You don't need the whole XCode. Open the terminal and run

    xcode-select --install

    which will prompt the installer.

  2. Homebrew: install it following the website's instructions, then export its path for now:

    export PATH="/opt/homebrew/bin:$PATH"
  3. Git: ensure you have git installed (it's present by default on macOS).

  4. zsh: install zsh with $ brew install zsh, then add the newly-installed zsh to /etc/shells (so that chsh will consider it a "safe" shell) and change to the newly added shell:

    echo "$(which zsh)" | sudo tee -a /etc/shells > /dev/null
    chsh -s "$(which zsh)" "$(whoami)"

    Now do these:

    • delete /etc/zprofile
    • empty out /etc/paths
    • remove path_helper-related lines from /etc/profile

    These slow things down and mess up with $PATH.

  5. Ensure you have the $DOTFILES environment variable set. For example:

    export DOTFILES="$HOME/dotfiles"
  6. Copy SSH keys from 1Password (after doing mkdir ~/.ssh), into ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.

  7. Clone the dotfiles and run the setup script:

    git clone git@github.com:whatyouhide/dotfiles.git "$DOTFILES"
    cd "$DOTFILES"
    ./setup
  8. Authenticate to GitHub by doing:

    gh auth login

    GitHub takes care of the whole flow for you, by redirecting you to a browser to do the authentication.

  9. Set up GPG signing of commits (mostly following this guide).

    1. Add the signinkey and gpgsign configs to ~/.gitconfig (the signinkey is in 1Password). Then, add this line to ~/.zshenv-extra:

      export GPG_TTY=$(tty)
    2. Export the public and private GPG keys from the previous machine:

      gpg --list-secret-keys # Get the ID like this
      gpg --export <ID> > public.key
      gpg --export-secret-key <ID> private.key
    3. Move these files on the new machine and run:

      gpg --import public.key
      gpg --import private.key

      Make sure that gpg --list-secret-keys shows the key.

    4. Set up macOS GPG signing with pinentry.

      brew install pinentry-mac
      echo "pinentry-program $(which pinentry-mac)" >> ~/.gnupg/gpg-agent.conf
      killall gpg-agent
  10. asdf: you're using asdf installed via Homebrew. Add this to ~/.zshenv-extra:

    echo "\nsource $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.zshenv.extra

Releases

No releases published

Packages

No packages published