The computer
I decided to buy a Framework 13 AMD Laptop mainly because I love the idea of modular laptops and I want to support it. I chose an AMD Ryzen 5 processor, 1x32 GB of RAM and the 250GB hard drive, no operatig system, US keyboard and DIY Edition. I can always upgrade some parts of it if I feel I need to in the future.
Build log
After receiving the computer I started to build it and once build installing the operating system and tools. I am writing down everything for myself so I can remember what did I chose and why.
Building the computer
The first resource look at is The official getting started guide
Then I get the screwdriver and I build the computer. Building the laptop is really straightforward.
After checking it turns on and I get to the BIOS screen I check if this laptop is running the 3.02 or 3.03 BIOS version, I see how in this Knowledge Base article and the laptop has 3.03 so there is no update needed here.
Now I have to choose the operating system, the recommendation is Ubuntu but this is not a work laptop, it is for personal use and will be more fun if I install Archlinux.
Installing Archlinux
I download this Archlinux ISO and create a bootable USB drive using cat
, I was used to rely on dd
for this job, but in the Arch wiki it is explained why this is not a good option anymore.
In order to be able to start it from a USB drive I disable Secure Boot from the BIOS menu.
Later I would try restoring Secure Boot after the installation, but as it did not work out of the box I left it permanently disabled.
Then I install the operating system following the instructions from the Arch Wiki.
I set the keyboard layout to en_US
.
I update the system clock.
Then I follow these instructions here in the Arch Wiki to set the a better value for the block size, changing it from 512 to 4k.
I create the following partitions:
- 1 GB for UEFI .
- 8 GB for swap.
- The rest of the space for an EXT4 partition.
And then set GPT instead of MBR.
I didn't configure LVM, system encryption or RAID because I don't believe I am going to need any of those.
Then I create the filesystems and mount the ext4 partition in /
, the UEFI partition in /boot
and write the partitions table.
I start with the first set of packages, picking this very basic list:
base linux linux-firmware amd-ucode iwd vim man-db man-pages texinfo
It includes man
, iwd
for connecting to the internet and adm-ucode
to have early microcode updates.
Next set my timezone to generate /etc/adjtime
, set the hostname
and the root password.
The final step is the trickiest for me, I decide to configure the boot loader. For several reasons I decide to go for EFISTUB
But then I have to go through some back and forth using efibootmgr
until I finally got it right, I cleanup the preexisting boot entries and add the new one with:
efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "EFISTUB Arch" --loader /vmlinuz-linux --unicode 'root=UUID=here-goes-the-uuid-for-the-root-partition rw initrd=\amd-ucode.img initrd=\initramfs-linux.img
Then I can reboot the computer, remove the USB drive and directly run my new Archlinux system from the hard drive.
Setting system locale
The first thing I do after logging in is to set the LANG
env variable in /etc/locale.conf
, generate the appropriate locales with localegen
and add the environment variable to .bashrc
.
Connecting to the internet
The next important thing to do is connect the system to the internet, I am very pleased with iw
as it makes connecting to my wifi network extremely easy, however I can't ping google.com
because name resolution is not yet configured.
I enable iw
and resloved
services using systemd
.
systemctl enable iw
systemctl enable resolved
And then I configure systemd-resolved
using this cloudflare configuration I found on Github as it looked quite convenient to me.
Even though name resolution is ok now, I still can't ping Google, it seems it is because the embedded DHCP client that comes with iw
is disabled by default and I have to enable it manually as explained here.
After doing that, I can successfully connect to the internet and start usingpacman
.
Managing other computers
I use pacman
to install openssh
and try logging in into one of my servers and running some commands, works without any flaw.
Creating a personal user account
Then I create my personal user account on the machine via useradd
and add it to the group wheel
.
Then using pacman
install sudo
and vi
so I can edit /etc/sudoers
and give permissions to this new account, once this is done I can keep working using a brand new personal account.
Installing a desktop enviroment
Now I want a desktop environment, I like i3
and as I really want to use wayland
as much as possible, this time I choose sway
instead.
I use pacman
to install sway
, then I am asked to choose form a ttf fonts list, I have no strong preferences here so I just picked the default gnu-free-fonts
.
If I try to run sway
now, I get a permissions error, this is because I have to choose between seatd
or polkit
, because seatd
has less dependencies I install it. Next I enable the seatd
service and add my personal user to the seat
group.
Now I can successfully launch sway
and have a desktop environment.
After closing sway
, I get some warnings, so in order to get rid of them I use pacman
to install swaybg
for having a desktop background, then Install xorg-wayland
to get rid of another warning, and the last two can be ignored according to this and this.
Checking the battery level
Next thing I do is use pacman
to install acpi
, it works and let's me check the laptop's battery level.
Installing packages from the AUR
When using Archlinux you need to install a lot of applications from the AUR.
Nowadays you can use a wrapper like paru and make your life much more easy.
I just run the few commands instructed in the README file of the project to clone and install it.
Installing a terminal emulator
I missing having a terminal in sway
so I use pacman
to install my current favorite terminal emulator, alacritty
. Then I set it as the default terminal for sway in the sway configuration file.
Installing a browser
I use pacman
to install firefox
, the installation asks me to choose between jack2
or pipewire-jack
After reading about PIpeWire I like it so I decide to rely on it for managing audio. Finally I just quickly configure my bookmarks toolbar and the search engine to be DuckDuckGo.
Setting up a knowledge base
My current setup involves using Obsidian as my writing app, and then I use Nextcloud to synchronize the documents on my computer, self-hosted server and phone.
I started using pacman
for installing nextcloud-client
, the installation required my to choose a password manager, I chose keepassxc
because the other options are KDE or Gnome tools.
Using pacman
again I install obsidian
and setup the vault.
Installing an application launcher
Now I want an application launcher, I used dmenu
in the past, but after seeing some cool screenshots from other people, I decide this time I'll be using paru
to install tofi
. After quickly copying the default configuration and adding it to sway I can use it to quickly launch any app.
Installing discord
I just run pacman
and install discord
, works out of the box.
Moving my projects folder
In order to keep working on my ongoing projects, I quickly start an open ssh server on the new computer and push the entire projects folder from the old computer using scp
.
I also use scp
to transfer my git ssh key.
I enable the ssh-agent
using systemctl as explained here with the following command systemctl --user enable ssh-agent
and add the environment variable:
SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
to .bashrc
. After rebooting I check I can directly do ssh-add
and run git pull
successfully.
Since I already had to install keepassxc
I try following the guide to integrate the SSH Agent and have the key there, sadly my current key is EC and is not supported, so I decided not to do it.
Installing docker
I rely on docker a lot to organize and deploy my projects, so it is an essential tool for me. I use pacman
to install docker
and docker-compose
. Then I add my use to the docker
group with sudo usermod -a G docker nacho
.
Configuring the terminal for efficiency
I use paru
to install oh-my-zsh
and add some very basic stuff to the configuration. I only add the git
, zsh-syntax-highlighting
and the z
plugins.
Then I install the theme powerlevel10k. When I run paru
now it seems there is an issue importing some keys. After some back and forth trying to fetch the key I am finally able using a command I find in the Arch Wiki:
nosferatu3% gpg --verbose --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8B060F8B9EB395614A669F2A90ACE942EB90C3DD
gpg: enabled compatibility lags:
gpg: data source: http://185.125.188.27:80
gpg: armor header: Comment: Hostname:
gpg: armor header: Version: Hockeypuck 2.1.1-10-gec3b0e7
gpg: pub rsa4096/90ACE942EB90C3DD 2020-02-04 Roman Perepelitsa <roman.perepelitsa@gmail.com>
gpg: using pgp trust model
gpg: key 90ACE942EB90C3DD: public key "Roman Perepelitsa <roman.perepelitsa@gmail.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
Using paru
to install powerlevel10k
is also a little tricky. I have to end up creating a symlink in a subfolder of /usr/share
and add promptinit
and prompt
statements to the configuration.
I move all the environment variables I previously added to .bashrc
to .zshenv
.
Switching from swaybar to waybar
I read waybar
is much more loved than swaybar
that comes by default with sway and comes with a nice battery indicator. So I use pacman
A to install waybar
and then set the swaybar_command
in the sway
configuration to replace it.
For having the right icons I use pacman
to install otf-font-awesome
and ttf-meslo-nerd
.
Saving system state if the battery drains totally
I start testing systemctl hibernate
and it seems not to be working correctly. I check carefully the Arch Wiki and I notice there are some steps to be followed first.
After fixing and re-generating inittramfs
I test again and hibernate works, even if I only have 8GB of space in the SWAP partition and my system memory is 32GB.
Now I follow the instructions to get the system to automatically hibernate on low battery.
It turns out the battery does emit udev events, but only when it is below the alarm level, so I can use the same udev rule written in the Arch Wiki. I wait for the battery to go low enough and the system hibernates automatically.
I just also quickly add a key bind for supend-then-hibernate
the computer in the sway config.
Installing an image viewer
I use pacman
to install feh
for viewing image files. I used this program in the past and just suits my needs.
Setting up screen capturing
I was used to scrot
but in the wayland world I have to install grim
using pacman
instead. In order to be able to dynamically capture a portion of the screen I also need slurp
that is installed using paru
, I add a key bind combining them together to the sway configuration like this:
grim -g "$(slurp)" ~/screenshots/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')
Installing a video player
In order to play videos I use pacman
to install vlc
and wget
. I install wget
so I can quickly download Big Buck Bunny to test VLC. And it seems there is no audio. I go to the settings menu in VLC and set PipeWire Sound Server
as the default device and now audio works.
Activating hardware video acceleration
I follow the article about hardware acceleration in the Arch wiki.
For the AMD Framework graphics card I use pacman
to install libva-mesa-driver
.
Then I use pacman
to install libva-utils
so I can run vainfo
and check if hardware acceleration works.
I get an error, so I use pacman
to install libva-mesa-driver
and check it works after that.
Next I use pacman
to install radeontop
so I can monitor the GPU.
It seems I do not need VDPAU if I already have VAAPI.
Installing a screen recorder
The first method I try is using gstreamer
. After installing both gstreamer
and gst-plugin-pipewire with pacman
and start looking for capturing commands, in order to apply some of the commands I find I also need to install gst-plugins-base
and gst-plugins-good
using pacman
too. It works! But it is capturing the webcam and not the screen.
I install xdg-desktop-portal
and xdg-desktop-portal-wlr
with pacman
, try to configure it and... at this point I give up and decide to check the Arch wiki. I remove everything I had just installed and look for screen capturing in the Arch Wiki.
I try the recommended tool wl-screenrec-git
that I install using paru
and works nicely and with no additional configuration.
Running virtual machines
I try qemu-base
first, but then I realize I need more than what is included in it so I install quemu-full
both of them available on pacman
.
Just for fun and testing I create a Windows 95 virtual machine following this tutorial I also use pacman
to install p7zip
since I need it to extract some compressed files.
Configuring the password manager
I configure keepassxc
, there are some options to be set that are not set by default, I set it to start minimized in the desktop tray, I initialize a database and configure the integrations both with freedesktop and firefox. Then I add it to the sway configuration to start automatically. This way when I autostart the Nextcloud desktop client it can automatically get the passwords from keepassxc
, I also test it asks me to store Firefox passwords and automatically fills them for me.
Installing graphic editing tools
I use pacman
to install my personal basic tool set of choice for graphics editing. blender
, inkscape
and gimp
.
Using multiple monitors
Connecting two additional monitors using an HDMI connector and a USB-C dongle works out of the box.
I use paru
to install wdisplays
to configure the right positioning and screen resolution and scaling.
Configuring for typing in Spanish
As the keyboard has a US
layout but I sometimes communicate in Spanish, I am adding the following environment variables to .zshenv
export XKB_DEFAULT_LAYOUT=us
export XKB_DEFAULT_VARIANT=altgr-intl
export XKB_DEFAULT_OPTIONS=compose:menu,level3:ralt_switch
this way I can use the right Alt
key quickly type the special characters áéíóúñ
.
Tools for Javascript projects
I am using pacman
to install pnpm
, and I use pnpm
to install turbo
. If I need to work with a project that still uses npm
I'll take the chance to migrate it to pnpm
.
Tools for Python projects
I am using pacman
to install pyenv
so I can manage Python installations when I need to.
I also install pyenv-virtualenv
using paru
so I can manage Python virtual environments.
Finally, I add the pyenv
plugin to .zshrc
.
Wrap up
And that is everything for now! This is a very basic system, but as it is it runs very well and has everything I need to suit my daily needs. I am using it everyday and I am pretty happy with it.
There are minor details and tweaks to do, some tools I may be missing. But I will figure them out as I use the computer and once I gather enough content I will write a new post for it, this is it for this first post!