Skip to content

Instantly share code, notes, and snippets.

@steshaw
Last active March 21, 2023 01:18
Show Gist options
  • Save steshaw/160b73aa5503f08511c3593244e4d1f1 to your computer and use it in GitHub Desktop.
Save steshaw/160b73aa5503f08511c3593244e4d1f1 to your computer and use it in GitHub Desktop.
Ubuntu desktop setup

Setting up a fresh Ubuntu machine

Start with Ubuntu

Install Ubuntu Desktop 22.04, encrypted ZFS, with minimal packages.

Install OpenSSH

We may want to do the rest of the installation/configuration from our laptop over ssh, so:

sudo apt install openssh-server

Install dotfiles

Install Shelly dotfiles and packages along with Nix.

Link Shelly "system" files. It will likely be necessary to alter the permissions of target directories and files. e.g. For /nix:

cd /nix
sudo chown steshaw:steshaw . nix.conf
chmod +w .
shelly-link-system-files

Install Regolith

  1. Install Regolith Desktop

  2. Install all looks

sudo apt install regolith-look-*
  1. Install status indicators:
sudo apt install i3xrocks-rofication
sudo apt install i3xrocks-memory
  1. Install Fira Code Nerd Font
sudo apt install fonts-nerd-font-firacode

Keyboard and shortcuts

Configure keymap

Execute the output of the following command. This will configure some common tweaks (such as using caps lock for escape). e.g.

runhaskell ~/Code/steshaw/shelly/src/shelly-set-keyboard-map.hs

e.g.

$ runhaskell ~/Code/steshaw/shelly/src/shelly-set-keyboard-map.hs 
localectl --no-convert set-x11-keymap us pc105 "" caps:escape_shifted_capslock,shift:both_capslock_cancel,compose:ralt,compose:sclk,lv3:enter_switch,ctrl:swap_lwin_lctl,ctrl:swap_rwin_rctl,apple:alupckeys,numpad:mac,altwin:ctrl_win

Install AutoKey

sudo apt install autokey-gtk

NoMachine

Install

Install NoMachine (via .deb). Download from https://www.nomachine.com/. e.g.

sudo dpkg -i ./nomachine_8.4.2_1_amd64.deb

Edit configuration

Make the following changes to /usr/NX/etc/node.cfg.

  1. Set DefaultDesktopCommand to the follow to start Regolith instead of Gnome:
DefaultDesktopCommand "/usr/bin/dbus-run-session gnome-session --session=regolith"
  1. Trick NoMachine into always starting a virtual display (instead of attaching to the physical display) by setting PhysicalDisplays to :10 (rather than :0). Set back to :0 (the default) if you actually want to connect to the physical display. A virtual display is nice because NoMachine will then match the resolution to the resolution of the connecting device making for a much nicer, non-scaled display. Also, this method will work with hardware that has no display.
PhysicalDisplays :10

Enable the new configuration by restarting the NoMachine server:

sudo /etc/NX/nxserver --restart

Dropbox

https://www.dropbox.com/install

Tailscale

Install Tailscale

curl -fsSL https://tailscale.com/install.sh | sh

Docker Engine

Install Docker Engine using the convienence scripts. You'll probably want to check the post-installation docs. In particular, you probably want at least:

sudo usermod -aG docker ${USER}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment