What to do after installing Manjaro Qonos 21.2

Arch Linux Manjaro

This guide serves as a reminder for me when I go to install Manjaro again. I will describe what I did after install to get my workstation back up and running with what I need to do JavaScript / TypeScript development.

Lenovo Legion T5 x86_64 Grub 2 Kernel 5.13 Manjaro Qonos 21.1 KDE 5.88 Plasma 5.23

Contents

Pre-Install

Note: Backup your current files to another partition or use an external drive or USB stick. I keep my console files in a GitHub repo, see Bash below.

The main things I backed up were:

  • ~/.local/bin/
  • ~/.config/sublime-text/Packages/User/
  • ~/.gitconfig

Post-Install

Here is my list of things I did to get up and running with a fresh Manjaro.

$ cat /etc/lsb-release
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=21.2.0
DISTRIB_CODENAME=Qonos

Update

First update the local mirror and system packages

$ sudo pacman-mirrors --fasttrack
$ sudo pacman -Syu

Firewall

The firewall is super easy to setup for minimal protection

$ sudo pacman -S --needed gufw

Then just run the GUI

$ gufw

System Configuration

Graphics Card

Install proprietary video drivers (Nvidia)

$ systemsettings5 msm_mhwd

Date and Time

Set date and time automatically

$ systemsettings5 clock

Package Management

$ sudo systemctl enable --now snapd.service
$ sudo ln -s /var/lib/snapd/snap /snap
Yay
$ sudo pacman -S --needed yay
$ yay -Y --gendb && yay -Syu --devel

Uncomment Color option in /etc/pacman.conf

System Monitor

$ sudo pacman -S --needed ksysguard
$ ksysguard --version
$ ksysguard 5.22.0

Solid State Devices

Good things to do if you have an SSD (solid state device hard drive).

Reduce Swappiness

I have 32G memory so I can swap seldomly

$ sudo su
\# echo "vm.swappiness=10" > /etc/sysctl.d/100-manjaro.conf
\# exit
Setup Block Cleaning Job
$ systemctl list-timers -all
NEXT                        LEFT          LAST                        PASSED    UNIT                         ACTIVATES
Mon 2021-11-29 18:46:32 EST 5min left     n/a                         n/a       systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.ser
Tue 2021-11-30 00:00:00 EST 5h 18min left Mon 2021-11-29 17:43:41 EST 57min ago logrotate.timer              logrotate.service
Tue 2021-11-30 00:00:00 EST 5h 18min left Mon 2021-11-29 17:43:41 EST 57min ago man-db.timer                 man-db.service
Tue 2021-11-30 00:00:00 EST 5h 18min left Mon 2021-11-29 17:43:41 EST 57min ago pkgfile-update.timer         pkgfile-update.service
Tue 2021-11-30 00:00:00 EST 5h 18min left Mon 2021-11-29 17:43:41 EST 57min ago shadow.timer                 shadow.service
Thu 2021-12-02 10:39:52 EST 2 days left   Mon 2021-11-29 17:43:41 EST 57min ago pamac-mirrorlist.timer       pamac-mirrorlist.service
Sat 2021-12-04 15:00:00 EST 4 days left   Mon 2021-11-29 17:43:41 EST 57min ago pamac-cleancache.timer       pamac-cleancache.service

$ systemctl status fstrim.timer
 fstrim.timer - Discard unused blocks once a week
    Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; disabled; vendor preset: disabled)
    Active: inactive (dead)

$ sudo systemctl enable fstrim.timer
Created symlink /etc/systemd/system/timers.target.wants/fstrim.timer /usr/lib/systemd/system/fstrim.timer.

$ systemctl status fstrim.timer
 fstrim.timer - Discard unused blocks once a week
    Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset: disabled)
    Active: inactive (dead)

$ systemctl status fstrim.timer
 fstrim.timer - Discard unused blocks once a week
    Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset: disabled)
    Active: active (waiting) since Mon 2021-11-29 18:47:13 EST; 9s ago
    Trigger: Mon 2021-12-06 01:30:45 EST; 6 days left

Hosts

$ sudo hostnamectl set-hostname legion
$ sudo vim /etc/hosts
127.0.0.1       localhost
127.0.0.1       legion
104.237.140.142 cowboy

Scripts

Restore ~/.local/bin/

Firefox

Use dark theme

about:addons -> Themes

Update search engine to Duck Duck Go:

about:preferences#search -> Default Search Engine

Do not warn when closing multiple tabs:

about:config -> Search: browser.tabs.warn

browser.tabs.warnOnClose false browser.tabs.warnOnCloseOtherTabs false

Add-ons

  • Dark Reader by Alexander Shutau
  • Traquility Reader by arunk

Keys

Install ssh keys

Generate

https://help.github.com/en/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

ssh-keygen -t ed25519 -C "stav@legion"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed255192

Add to remotes

Manually copy contents of ~/.ssh/id_ed255192.pub to GitHub & Bitbucket.

GitHub
BitBucket
Cowboy

Enable password login on remote host

https://cloud.linode.com/linodes COWBOY LISH

cowboy$ sed -iE ‘s/^PasswordAuthentication no/PasswordAuthentication yes/g’ /etc/ssh/sshd_config cowboy$ sudo systemctl restart sshd

Authorize key

cat ~/.ssh/id_ed25519.pub | ssh cowboy 'cat >> ~/.ssh/authorized_keys'

Disable password login on remote host

cowboy$ sed -iE ‘s/^PasswordAuthentication yes/PasswordAuthentication no/g’ /etc/ssh/sshd_config cowboy$ sudo systemctl restart sshd

Bash

git clone git@github.com:stav/dotbash.git ~/.bash

Install bash_it

git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it
~/.bash_it/install.sh  # keep existing `.bashrc` and append templates (y)
Install Powerline theme

https://github.com/Bash-it/bash-it/tree/master/themes/powerline

mkdir ~/Public/powerline cd ~/Public/powerline git clone —depth=1 https://github.com/powerline/fonts.git ./fonts/install.sh wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf mv PowerlineSymbols.otf ~/.local/share/fonts/ fc-cache -vf ~/.local/share/fonts/ mkdir -p ~/.config/fontconfig/conf.d/ mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/

Close all Terminal instances

Copy files

.bash_projects .bash-it.bash .bashrc

ls .bash_links/

.bash_links/.bash-it.bash -> ~/.bash-it.bash .bash_links/.bash_projects -> ~/.bash_projects .bash_links/.bashrc -> ~/.bashrc

Hugo

It’s good to update this document as I’m installing.

Clone Repository

git clone git@github.com:stav/steven.michael.git ~/Public/stav/steven.michael
cd ~/Public/stav/steven.michael
git submodule update --init --recursive

Install Hugo Extended Version

The Academic theme needs the extended version for the Sass/SCSS support.

If you run Hugo but get an error like this:

$ hugo Building sites ERROR: failed to transform resource: TOCSS: failed to transform “main_parsed.scss” (text/x-scss): this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn

then you need the extended version.

Download and extract the Hugo extended version, see Assets (hugo_extended_0.64.0_Linux-64bit.tar.gz).

cp ~/Downloads/hugo_extended_0.89.4_Linux-64bit/hugo ~/.local/bin/

Install Golang

sudo pacman -S --needed go

Sublime

Sublime Text is an excellent editor and Sublime Merge is good enough now that I hardly ever use the command line anymore for Git anymore.

Install

curl -O https://download.sublimetext.com/sublimehq-pub.gpg && sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg
echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | sudo tee -a /etc/pacman.conf
sudo pacman -Syu --needed sublime-text sublime-merge

License

Add under help menu.

----- BEGIN LICENSE ----- Steven Almeroth Single User License EA7E-… 104B ------ END LICENSE ------

Package Control

You want Package Control from wbond.

Install Package Control

Command Palate (shft-ctrl-p) -> Install Package Control

Install packages

Restore the following file from your backup and Package Control will automatically install all missing packages:

  • ~/.config/sublime-text/Packages/User/Package Control.sublime-settings

then restart SublimeText.

Copy Files

Copy remaining backup files to ~/.config/sublime-text/Packages/User/

Do not copy these:

  • User/Package Control.cache/
  • User/Package Control.last-run
  • User/Package Control.merged-ca-bundle
  • User/Package Control.user-ca-bundle

VS Code

sudo snap install code --classic

code ccbaa2d2 from Visual Studio Code (vscode✓) installed

Development

sudo pacman -S --needed base-devel git meld

Applications

sudo pacman -S --needed brave-browser libreoffice-fresh telegram-desktop thunderbird gimp mpv

Productivity

sudo pacman -S --needed vim tree timeshift

Node

We will use the Node Version Manager (nvm) to install specific versions as needed so first we just install the base packages

Install dependencies

sudo pamac install nodejs npm nvm

Use nvm to install node

I needed to run a setup script to get nvm to run:

source /usr/share/nvm/init-nvm.sh

Let’s see what versions we can install:

nvm ls-remote |grep Latest

v4.9.1 (Latest LTS: Argon) v6.17.1 (Latest LTS: Boron) v8.17.0 (Latest LTS: Carbon) v10.24.1 (Latest LTS: Dubnium) v12.22.7 (Latest LTS: Erbium) v14.18.2 (Latest LTS: Fermium) v16.13.1 (Latest LTS: Gallium)

nvm install 16
Now using node v16.13.1 (npm v8.1.2)

Install package managers

corepack enable

Update yarn

yarn set version stable

Install pnpm

corepack prepare pnpm@6.22.2 --activate

Previous Installs

I previously installed some other stuff: