Setting up a new box

*

Documenting the steps needed to set up a new Linux box. I'd kind of ultimately like to get things smooth enough to the point where I'm fine doing a fresh install of the OS pretty regularly, like every couple of months. Kind of a disaster recovery thing.

1 Main goals

My main usage is:

  • org
  • org-roam
  • emacs for coding

So it's pretty much all about getting emacs set up. The rest is just sugar on top after that, really.

2 Install Debian

Debian as OS. Why Debian?

Using Gnome 3 for desktop environment for now. Not a huge fan though.

2.1 Some minor quality of life things

2.1.1 Theme

Change to adawaita-dark via Tweaks / Appearance.

I could probably script this if I wanted: command line - How can I script the settings made by gnome-tweak-tool? - Ask …

2.1.2 Guake

A heads up display for the terminal.

sudo apt install guake
  • Run guake-preferences, set Keyboard shortcuts -> Toggle visibility to Ctrl+'.
  • Add to startup applications in Tweaks.

3 In the beginning there was git

At present I have much of my stuff backed up in a git repo somewhere, so I need git to pull that in.

3.1 add my user to sudoers

3.2 get git

sudo apt install git

4 Passwords and ssh keys

Then I need my passwords and ssh keys.

Realising a slight flaw here in that I need my in theory need my keys in order to access gitlab. In practice I can currently get it via password-based access, and I can remember my password. Or I can copy from an existing device. But assuming I lost all my devices, and also my memory, I would perhaps not be able to access (though I might be able to get emailed reminders - though what if I couldn't access my email?) Anyway, upshot is, I should be storing my keys somewhere offline and always close to hand, too.

sudo apt install keepassxc
git clone https://gitlab.com/ngm/keepass ~/Documents/keepass

4.1 ssh keys

cp ~/Documents/keepass/keys/* ~/.ssh/
chmod 600 ~/.ssh/*

5 get my dotfiles

git clone https://github.com/ngm/dotfiles

6 Install spacemacs

6.1 Install emacs

from source.

on debian, you don't have emacs 27 out of the box. so guess go with installing from source, hey ho. that's fine, but takes a while.

Installing Emacs from source

6.2 install spacemacs

git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d

6.3 setup my config

ln -s ~/.dotfiles/spacemacs.d ~/.spacemacs.d

6.4 install source code pro

see: software installation - How to use the Adobe Source Code Pro font? - Ask Ubuntu

sudo wget --content-disposition -P /usr/share/fonts/opentype/source-code-pro https://github.com/adobe-fonts/source-code-pro/blob/29fdb884c6e9dc2a312f4a5e2bb3b2dad2350777/OTF/SourceCodePro-{Black,BlackIt,Bold,BoldIt,ExtraLight,ExtraLightIt,It,Light,LightIt,Medium,MediumIt,Regular,Semibold,SemiboldIt}.otf?raw=true 

6.5 start emacs

Start it up, and spacemacs should then do its installation business.

See My Spacemacs User Config for more details.

6.6 install icons

M-X all-the-icons-install-fonts

7 Set up my org files

org-mode itself is already set up from the spacemacs installation above. This is just pulling in my own files.

git clone https://gitlab.com/ngm/org ~/org

Had to disable mu4e for some reason.

8 Set up my org-roam files

Likewise, various bits of org-roam install and config are taken care of by spacemacs installation.

This is just pulling in my files.

git clone https://gitlab.com/ngm/commonplace ~/commonplace

9 Set up syncthing

I use syncthing to sync files between machines. Most of what I sync I've already pulled in via git (which functions as the backup). This just does real-time syncing of them when I make changes.

9.1 Install

The default Debian one is mega out of date, doesn't work with syncthing on other devices.

So use special repo. See https://apt.syncthing.net/

sudo apt install curl
sudo curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
printf "Package: *\nPin: origin apt.syncthing.net\nPin-Priority: 990\n" | sudo tee /etc/apt/preferences.d/syncthing
sudo apt update
sudo apt install syncthing

9.2 Add shared folders for syncing

9.3 Add to startup programs

Add 'Start Syncthing' to startup apps via Gnome Tweaks.

10 Set up tmux

tmux.

11 Install Nextcloud

11.2 install

mv Downloads/Nextcloud-3.3.0-x86_64.AppImage Programs/
cd Programs
chmod u+x Downloads/Nextcloud-3.3.0-x86_64.AppImage
./Nextcloud-3.3.0-x86_64.AppImage

11.3 Configure folders

In Nextcloud Settings, check InstantUpload, Multimedia, and Shared multimedia folders in the list of synced folders.

12 Setup calendar

13 Setup work account

14 Setup Apache

sudo apt install apache2

15 Configure Firefox

15.1 Settings

I could perhaps just use Firefox Sync here, but it's only a few settings and I don't particularly want to set up the account.

  • homepage and new windows - blank page
  • new tabs - blank page
  • search engine - YunoSearx

16 Install Calibre

16.1 Install

As per https://calibre-ebook.com/download_linux

Install script. (always be wary of running someone else's script!!!)

sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin

16.2 Configure

Set /home/neil/Nextcloud/Shared multimedia/eBook as the library folder.

17 Elsewhere in the garden

Notes that link to this note (AKA backlinks).

This page last updated: 2021-08-08 Sun 11:02. Map. Recent changes. Source. Peer Production License. Webring: << random >>