Ubuntu Configuration

TL;DR

I end up installing and reinstalling Ubuntu a lot. As with many Linux users, I cannot not customize my installation. However, I use multiple devices with several accounts, some of which are not managed by me. This leads to a massive headache when trying to keep customizations in sync, especially when they keep changing as I learn new things.

This page documents the process I follow to configure a fresh Ubuntu installation to my preferences. Much of it is finally automated in a manner I'm satisfied with, but there is still quite a bit left on my backlog I need to add. Additionally, due to limitations outside my control, on some systems I have to jump through hoops to get things set up the way I like.

Pre-configure Steps

Prerequisite packages

The following packages are necessary to proceed.

sudo apt install vim git curl

SSH Keys

Before I can clone my dotfiles repository, I need to generate (or copy from backup) an SSH key and add it to GitHub

mkdir -p ~/.ssh
ssh-keygen -t rsa -b 4096 -f ~/.ssh/git
echo "AddKeysToAgent yes
IdentitiesOnly yes

Host github.com gitlab.com git.agill.xyz
IdentityFile ~/.ssh/git

Host anguish
HostName xxx.xxx.xxx.xxx
IdentityFile ~/.ssh/anguish" > ~/.ssh/config

Note that until SSH keys are generated and copied to their respective hosts, and the rest of the SSH config file is added, it may be necessary to add the -o 'IdentitiesOnly yes' argument to disable ssh from attempting to authenticate every key it knows about.

I still need to find a good way to generate ~/.ssh/config from the configure.sh script in a manner that doesn't break things. Perhaps this will always have to be a manual step.

Installing the dotfiles

Cloning the dotfiles repository

My dotfiles repository include several Vim plugins, as well as fzf as Git submodules. Thus be sure to clone with the --recurse-submodules option, or run git submodule update --init --recursive after cloning.

git clone --recurse-submodules git@github.com:Notgnoshi/dotfiles.git ~/.config/dotfiles
git submodule update --init --recursive

Deploying dotfiles to home folder

~/.config/dotfiles/deploy.py ~
source ~/.bashrc

Running the configuration script

Run ~/.local/bin/configure.sh and answer y to the prompts you wish to accept. The script will interactively perform the following tasks

Note that the Gnome extensions should be installed from the browser by visiting extensions.gnome.org when prompted before tweaking the Ubuntu system settings through gsettings