It’s been a long time since I wrote something in the blog. A lot of things happened since my last blogpost. One of the interesting things that I’ve been into is working on my new setup.
This post is the first of a series of articles about my new setup. I’ll share with you the things I added to (and removed from) my workflow, and how they benefited me.
The big problem: Hardware
My job and my research as a systems' engineer requires from me to create clusters of VMs (and containers) in order to simulate various environments and architectures. Likewise I use my computers to write code and compile it, and test new software. And of course I am not a gamer! at least for the time being, I don’t plan to game on my PC. Maybe I’ll build a Gaming PC later or just stick to consoles.
Having all that, the most important resources for me are CPU, RAM, and storage. A beefy GPU will be be a plus but it is not required.
At first I had two options in my head:
Option1: Mid-range laptop + Building/Buying a home server from scratch
This approch is very good, it will be learning experience for me, and it will allow me more control over the hardware(types, specs…) however it will take more effort and money (Hardware is rare and expensive in Morocco), and especially time. I didn’t have the time to spare looking for the various components required to build the home lab from scratch, to say nothing of setting everything up and troubleshouting where it is required.
Another solution I though of is buying a ready to use home server, still this will require more work buying the equipements for it.
Despite all of the disavantages I listed before, this option was still tempting for me. The deal breaker for me was mobility! At the moment, I can’t afford to run a home lab in a specific fixed place, since I am still pretty mobile and I go back and forth between two cities (My home city and the city where I work).
Option2: A Laptop with good specs (I went for it)
To be honest, these are to find for a good price.
I spent some time looking for a good laptop for a good price. I considered many models specifically Thinkpads (T14, T4x0, Pxx) and Dell XPS. Each time there was something preventing me for making the purchase, be it the price, the specs or some reviews I read on the internet.
I kept looking until I met Sango tech (These guys are awesome, go check them out). I tried some laptops, and at end I bought an HP ZBook 15 with a quad core Xeon CPU, 32G of RAM and 512G of SSD storage.
The fun part: Software
For this install, I wanted things to be as minimalistic as they can. I wanted to have the minimum required packages installed and delegated all the other unnecessary workloads to either containers or vms or python. I’ll talk about this approach in the next posts.
Arch Linux ❤️
Again I went for GNU/Linux. There are various reasons why I chose GNU/Linux again, the most important are:
- I am used to it. I’ve been using it for years, and built tools and workflows relying on linux (a unix derivative in general)
- It does fit my daily computing needs perfectly.
- I often need linux (the kernel) for my work: I work a lot with containers, also I use KVM for virtualization, and I am a Systemd fan (Shame on me or shame on you).
For the distribution, I went for vanilla Arch linux because:
- I love Arch linux, and I am so grateful for the community around it.
- It does fit my daily computing needs perfectly.
- It is bleeding edge, and it has a rolling release schedule, which means I get to use new software at soon as it is released.
- It is minimalist: the
basepackage does contain the bare minimum for a linux distro, and it gives me the control over what to install and what not.
- Pacman ❤️: For me it is the best package manager I’ve ever used.
In the previous installs I was using ext4 with lvm. It did work well for me!
In this new installed I decided to give Btrfs a try. It is a fairly new filesystem, it is CoW by default and it has a lot of neat features such as compression, snapshots(way practical than LVM’s), volume management including Online volume Grow/Shrink operations.
I haven’t made use of most of these awesome features, but I am looking to. Especially snapshots which I used for backuping my rootfs and I am planning to use them in other use cases.
So far, so good! Btrfs surpassed my expectations. It does the job in the best way possible.
Finally, there some things you should consider if you are going to use Btrfs:
- If you have VMs disks using Qcow2 format, having them stored in a Btrfs volume can affect your vms performance (CoW on CoW problem). In my case I haven’t noticed serious performance issues yet.
To solve this problem you can disable Btrfs CoW on the directory storing you vms, or just use the
rawimage format instead of
- I’ve some problems with Kubernetes (Kubelet) running on btrfs subvolumes. There is a bug in the kubelet code itself, not in the btrfs.
- If you are planing to use Btrfs for production (RAID setups) check their wiki first and ask someone who has already did use in production.
The init System and beyond
I use Systemd!! And I love it!!
Once and for all Systemd is not a big evil monolith, that is breaking the Unix philosophy for no reason. And if it is, then Linux is too,so and you should hate on it as well. If you hate systemd please watch this and read this.
Coupled with being an init system for Linux, Systemd is a big toolbox with tons of useful software to satisfy the system management needs. Systemd abstract away various system management tasks, an offers a unifed easy to use language to instead.
Since Arch Linux comes with systemd out of the box, I use its services whenever I can. Here are some systemd services and features I use daily.
- systemd-boot: a minimalistic UEFI boot loader. GRUB has more features, but systemd-boot is more than enough for me.
- journald: a system event logger. I use it always, and I love journalctl.
- timesyncd: NTP daemon. I use it to keep my clocks in sync. It can be managed using
- networkd: The best way to define networks and configure them.
- resolved: for DNS configurations.
- timers: Cron alternative! very practical since it’s well integrated with systemd.
- a lot of other cool features: socket activation, path and device based activation, unit dependency management and synchronization, cgroup management, and
systemd-nspawnare some other very cool and useful systemd features and use from time to time.
Networking: The new way
I’ve always struggled to choose my main network manager. For my last setup, I was using
netctl for both wired and wireless. What I didn’t like about
netctl is that it requires a lot of dependencies (
dialog for wireless configuration) and tweaking in order to get a working configuration.
In this setup, I came across
iwd and it’s a blast!! It has 0 dependencies and it comes with functional 😛 client cli out of the box called
iwctl. For network configuration and wired connection I use
systemd-networkd and I am happy with it.
Core and productivity tools
There some tools, that make into into your daily routine and you find yourself always bringing them with you whenever you are.
neovim: I am a vim user, I use it for almost everything.
vimwith a bunch of cool features out of the box.
tmux: it is my main driver, it became the first thing I open when I start working on something.
zsh: I use it instead of
bash. I use it withh
oh-my-zsh. I am too lazy to configure it from scratch.
htop: it is so useful for quick process management.
vifm: my goto file manager now.
fzf: THE fuzzy finder.
z: very useful utility to move fast between directories
bat: a better
entr: it watchs the filesystem for changes and execute a specified command.
ripgrep: very fast grep alternative. I use it to look for words recursively.
jq: for json parsing.
keychain: It is a manager for ssh-agent, gpg-agent. I don’t need to write my ssh-key passphrase anytime I have push something to github 😎.
atool: I used to use a shell script I wrote to handle archive management, until I discovered
atool. It is s easy to use and support almost all the compression/archive formats.
The Graphical interface
For the display server I use
xorg, I went for the bare minimum:
xserver which comes with many X-utilities in arch linux,
xinit for initialization, and
xbacklight to control the screen backlight.
For my desktop, I’ve tried a lot of Desktop environment before, including
deepin DE and others. I also tried many standalone Window managers such as
bspwm … I prefer WMs, epecially tilling ones, since I’ve been using them for a long time and I feel more produtive in the tilling mode.
The choice for the new setup was on
bcpwm which I was using before because:
- It is so minimalist, and has the minimum set of features o be called a WM.
- It delegates all the other work to other tools like
- It is configured using scripts (shell or python or whatever scripting language).
xmonadare good but take time to setup and I still don’t have a reason to switch to one of them.
Beyond the WM
On top of the WM, I use multiple tools and workflows for the various GUI tasks.
- I use
stas my main terminal, It is minimalistic and fast. I also keep
alacrittyaround in case
stfails or something.
- I use
dunstfor notifications. It is so practical and easy to use.
- For screen resolution management, I use
arandrwhich is a GUI
- For screen locking I use
systemduser unit files.
- I use
dmenuheavily. I have menus for everything: password management, documents, search engine, a python calculator …
- For image viewing I use
fehinstalled in case I need it), for wallpapers I use
xwallpaperand for screenshots I use
slopto select specific areas on the screen.
- I use
xclipfor clipboard management, I use it to copy from my terminal, also to get screenshot directly from
Media and other things
I prefer CLI/TUI application over GUI whenever I can, since they are often smaller, faster, and often come will less distractions. This doesn’t mean that I don’t use GUI apps. There are awesome GUI appliactions that I love and use daily. Here are the main apps I use for media playing and other daily computing:
- For video I use
mpv, it is the best media player I’ve ever used. Minimalistic but feature rich! I simply love it!
I use mpv for
- For music, podcasts and audio files I use
ncmpcpp, which are the best trio ever.
- For documents, I use
zathura-mupdfas a backend for pdfs and
- I use
gimpfor all my image editing and manipulation.
- I use
calcursefor my todos and sometimes for my appointments.
- For dictionnaries I use
sdcvfor offline lookups,
curlfor online ones,
translate-shellfor translation, and
aspellfor spell checking.
- Also I use
rtv(reddit cli client), and
w3m(cli web browser) with
readability-clito get my news.
- For email, I used to use
neomutt, but I don’t use it no more.
passis my password manager.
This is the first part of a series of articles where I will try to share information about my workflow, and the tools and practices I use daily for work and for my personal computing journey.
Thank you for reading! Stay safe 🙏