Personal notes on bootstrapping a basic Raspberry Pi setup
These notes are intended for my own personal use only; you are free to use them for reference, but you'll almost certainly find they include steps which don't match your preferred configuration or needs. Please don't use my email address in your own setups 🙃.
-
Update the installed software.
sudo apt-get update sudo apt-get upgrade --yes
-
Install some basic dependencies.
sudo apt-get install --yes \ emacs \ mosh \ zsh
-
Make zsh the default shell.
chsh -s $(which zsh)
-
Customise the zsh prompt (using
configure-prompt
).mkdir -p ~/Projects cd ~/Projects git clone https://github.com/jbmorley/configure-prompt.git echo """FPATH="\$FPATH:\$HOME/Projects/configure-prompt" autoload configure-prompt configure-prompt """ >> ~/.zshrc
-
Install Tailscale.
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.gpg | sudo apt-key add - curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.list | sudo tee /etc/apt/sources.list.d/tailscale.list sudo apt-get update sudo apt-get install --yes tailscale sudo tailscale up
You may also wish to disable key expiry for this new machine (see https://login.tailscale.com/admin/machines).
-
Generate an SSH key.
ssh-keygen -t ed25519 -C "hello@jbmorley.co.uk"
-
Install and authenticate the GitHub CLI. This is one of the most hands-off ways of adding your SSH key if that's how you prefer to authenticate with git).
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null sudo apt-get update sudo apt-get install --yes gh gh auth login
-
Set the git user.
git config --global user.email "hello@jbmorley.co.uk" git config --global user.name "Jason Morley"
-
Set the git editor.
echo "export EDITOR=emacs" >> ~/.zshrc
- Set the hostname
- authorized_keys
- Update the password