How to: set up the user environment

Initial set-up for non-NixOS machines

  1. Install Nix:

    curl https://nixos.org/nix/install | sh
    
  2. Install any missing useful packages:

    for cmd in emacs git stow tmux mosh zsh; do
        if ! type $cmd &> /dev/null
            nix-env --install $cmd
        fi
    done
    
  3. Change user shell to zsh.

General set-up

  1. Generate an SSH key:

    ssh-keygen -a 100 -t ed25519
    
  2. Add the key to things as appropriate (GitHub, private git, nixfiles, etc)

  3. Clone and symlink dotfiles:

    cd ~
    
    git clone git@github.com:barrucadu/dotfiles.git
    # OR
    git clone https://github.com/barrucadu/dotfiles.git
    
    cd dotfiles
    for d in *; do [[ -d $d ]] && stow $d; done
    
  4. Clone and symlink secrets (if this machine has private git access):

    cd ~
    
    git clone git@dunwich.barrucadu.co.uk:secrets.git
    
    cd secrets
    stow dotfiles
    for d in *; do [[ -d $d ]] && stow $d; done
    
  5. Restart terminal.