My Manjaro initial configuration

Linux Manjaro BTRFS LUKS

A fresh installation of Manjaro (at least on January 2022) doesn’t allow hybernation with the following configuration:

  • BTRFS filesystem
  • System encryption (LUKS)
  • SWAP partition with hybernation

If you hibernate a session you will not be able to restore it on next boot up.

This issue can be easily corrected adding the following lines to /etc/openswap.conf file and then running the command sudo mkinitcpio -P. Detailed explanation can be found here.

## additional arguments are given to mount for keyfile_device
## has to start with --options (if so desired)
keyfile_device_mount_options="--options=subvol=@"

SSH KEYS

If you need to use RSA then at least always use 4096bits. Ideally, instead I would recommend moving to the newer algorithm added in January 2014 to OpenSSH: ed25519.

ssh-keygen -t ed25519

No reason to specify bits here because they are always 256 bits.

To enable passwordless login to other servers simply copy the public key to the ~/.ssh/.authorized_keys file using the following command:

ssh-copy-id usertouse@remoteserver

GIT SETUP WITH GPG AND SSH

gpg --import myopenpgpkey.asc
git config --global user.email "alejandro@criadoperez.com"
git config --global commit.gpgsign true #to sign every commit

Get the ID of your key (details here):

$ gpg --list-secret-keys --keyid-format=long

/home/alejandro/.gnupg/pubring.kbx
----------------------------------
sec   rsa4096/866DD70C41B32C04 2021-06-16 [SC] [expires: 2024-06-15]
      87492374279274839ABC431432DACD4314121234
uid                 [ unknown] Alejandro Criado-Pérez <alejandro@criadoperez.com>
ssb   rsa4096/4C1E0379981626B9 2021-06-16 [E] [expires: 2024-06-15]

Add the key to the git config:

git config --global user.signingkey 866DD70C41B32C04

Add gpg key to zsh .zprofile by adding the following lines to the file ~/.zshrc :

if [ -r ~/.zshrc ]; then echo 'export GPG_TTY=$(tty)' >> ~/.zshrc; \
else echo 'export GPG_TTY=$(tty)' >> ~/.zprofile; fi

If you use bash instead of zsh add the following lines to the file ~/.bash_profile:

if [ -r ~/.bash_profile ]; then echo 'export GPG_TTY=$(tty)' >> ~/.bash_profile; \
else echo 'export GPG_TTY=$(tty)' >> ~/.profile; fi

BASIC SOFTWARE I LIKE TO INSTALL

sudo pacman -S iputils #for ping
sudo pacman -S retext #for markdown file edition

SETUP KEYS TO CONTRIBUTE TO AUR

Create a specific keypair to contribute to AUR:

ssh-keygen -t ed25519 -f ~/.ssh/aur

Add to ~/.ssh/config the following lines:

Host aur.archlinux.org
  IdentityFile ~/.ssh/aur
  User aur

Add my public key (aur.pub) to My Account in AUR Archlinux.