OpenSource, for me, really began with Linux.

This is a long post. But then again, I am compressing 5 years of adventures.

Just sit back, get your tea and enjoy.

Phase I: Discovering Linux

Abandoning MacOS

Before Linux I used MacOS (and loved Apple). But my beloved MacBook broke - wouldn’t charge anymore, not even on power supply. My attempts to repair left me a few hundred dollars lighter and with a broken MacBook. Frustration grew, a new solution was needed.

At the same time I started to code. One of the early lessons for any becoming coder is the UNIX philosophy. In short, building a program that does one thing, but really well, and that is modular to be used in combination with other such programs. The approach appealed to me and with nothing to lose, I installed Linux Mint on an older laptop.

The first Linux desktop

“Flashing a boot-able usb-drive” sounds fancy, but it’s not hard to do. With a simple Internet search anybody can do it. Downloading an ISO file also requires no skill. The installation process was plain simple and the default desktop charmed me. I made the decision then and there to keep walking this path.

Using Linux Mint as a daily driver took any angst and reservation. It really wasn’t that complicated. Navigating the desktop felt intuitive, the user interface was beautiful and the performance was great. Doing all basic things like browsing and editing code files with VSCodium were a breeze.

Soon after familiarizing myself with the basics and getting my groove, I looked to the horizon: Distro hopping.

Distro hopping

Distro hopping means installing another linux distro in hopes for a better computing experience.

Because… there are a lot of distros out there. How do you know you already found the best distro for you? Ubuntu with all it’s flavors alone can be smothering.

But I tried them all anyway. Was I more of a KDE Plasma or Gnome type of person? Or maybe Budgie? Cinnamon? I learned that the desktop environment is something different than the distro.

A desktop is basically the look and feel of your computer. How the windows are decorated, how the cursor looks, the opening and closing animations, as well as some programs like a file finder, password key-chain etc. There is a ton of variants out there. All open source and free to use.

Keep the distinction in mind: A distro or distribution is a complete package of software packages and desktop environment.

I realized what I like is actually “making the computer mine”. This allows me to have shortcuts to quickly open certain programs and be more productive.

Distro hopping is kind of a phase as you grow as a Linux user. But it’s not all futile. It broadens your horizon and shows various approaches to solve the same issue.

From Debian-base to Manjaro

As I was distro hopping, “package managers” started to peek my interest.

A package manager is a program that manages which software is installed on your machine and with what version. The package manger handles installation of new software and system updates. On Ubuntu and Debian the package manager is apt, on Arch it is pacman etc.

Apparently with the arch package manager you could get access to something called “the A.U.R.”. Apparently this would make life easier. And Manjaro delivered on that promise. It came with everything built in, supported Gnome and Plasma as desktop environments, and could enable the AUR.

During those times I gradually abandoned the graphic user interfaces (GUIs) and adopted the command line (CLI) more and more. First only to update the system, but then also to navigate the directory tree and tweaking with copy+paste snippets from the Internet.

Gaming on Linux

Manjaro also had a great reputation for gaming support. Gaming was a thing I was still missing a bit. Granted, on MacOS the gaming department is also fairly limited. The Manjaro hardware detection tool (mhwd) would automatically install any NVIDIA driver or other for you. This worked great! Linux computing was getting easier.

With Lutris, I was even able to play League of Legends on the older computer!

So gaming was slowly coming around. Nowadays this is a non-issue. If “but I can game on Linux” is what’s holding you back to switch to Linux, be assured: Almost any steam game now runs out of the box.

Valve, the company behind Steam, has since come out with the Steam Deck which runs on the Arch package manager.

Phase II: Tiling windows and dotfiles

Tiling window managers

If you don’t know what that term means, good for you! Jokes aside, you know how a window opens when you double-click an application? Have you ever asked yourself how the size and position of that window is determined? Well, tiling window managers manage that.

Why would you want to worry about that? If you are a true keyboard warrior, your entire worth is measured in how little you have to touch a mouse to use a computer. Allegedly, if you keep the hands over your keys at all time, you can actually work faster.

A window manager (short WM) arranges the window on your screens. A tiling window manager automatically arranges the windows in tiles on your desktop. This ensures maximum real-estate usage of the screen and alleviates the hustle of manually resizing windows.

QTile

I took that leap, dipped my toes into i3 and awesomewm, but landed on qtile. The reason was that Python was the only programming language I knew & QTile is written in Python. This was a great match, because I could practice programming on my own configuration! Also, it was again a declarative approach, which meant “re-installations” were easy.

QTile challenged me to solve small issues like the status bar myself. But it also empowered me to configure things exactly how I wanted.

What motivated me was the idea that my work will not be lost.

I am always building and improving.

But QTile on top of a Manjaro installation is… Well not ideal. Either you have an entire unused desktop environment installed, or you look elsewhere.

Off the beaten path: Arco Linux

The time with Manjaro and pacman came in handy. I could leverage the same packages on a more “headless” distro. After some research I found Arco linux.

Arco is cool, because it gives you an easy and customizable arch-base install. It allows for easy auto-install scripts and fit my need really well.

But Arco is not pure Arch. For some months this didn’t bother me too much. But then, the nagging that I could not honestly say “I use arch, BTW” was too much. I had to dare the dreaded install.

Establishing dotfiles

With my existing use of doom emacs, I was no stranger to storing configuration in text files that are checked into a repo. So I consolidated my emacs configuration with my qtile configuration and some useful scripts and had my first dotfiles repo!

The gist is that you can keep all configuration files in a single place - and repo. With the gnu stow command the files can then be symlinked to their proper place. A very powerful workflow that I still use to this day for some stuff.

Phase III: Mastering Arch

Daring Arch

Some consider Arch linux the pinnacle of GNU/Linux: Rolling release, AUR, most packages, you name it.

The Arch install was not that hard. But I do consider it a “rite of passage”. Now I was finally part of the cool kids! And I would never distro hop again. Right!?

Learning how to solve problems

In all honesty, the install and everything to do with Linux taught me how to approach problems and solve them. To this day I can’t remember a single problem that I have not managed to solve. My process boils down to this: Try => fail => formulate hypothesis why it fails => research => tweak steps. Repeat.

Now, on that “research” part, the best resource I found was the arch wiki. It became the first site I would go to, to learn more about a particular aspect of the computer. Having such a “bible”, a single place of knowledge, is invaluable.

Even if you are not using arch, the wiki may be able to help you out.

Versioning packages

By now, the command line had become my bread and butter. Especially for administering the packages installed on my machine.

To discover new software I used paru. Not a complete stand-alone package manager, paru wraps pacman to ease the interaction with the AUR. It also comes with a great CLI search.

I also played around with aura, which actually is a stand-alone package manager that creates snapshots (like lock-files) of all packages installed. Aura can be used for creating more “reproducible” systems. For example if you want to keep to machines in sync in terms of the software they are running.

Managing two systems

I started having a work laptop. Of course this machine had to be configured the same as my personal machine. Thanks to the installation scripts and dotfiles I was quickly able to set it up. This was great! Just imagine on your first day of work to come in and for the first few hours wait as your computer is automatically installing everything you are used to.

As time progressed, I tried to keep my work and home laptop configured in sync. Things I configured on one system should also be available on the other.

But this was cumbersome. Merging the inevitably diverging git branches became an hour-long task. And even then, some configuration commands I did on one system I had forgotten on the other - a doomed endeavor.

But what could solve this problem? Could there be a better distro out there for me?

Phase IV: Declaring reproducibility

Yes. Yes, there could: NixOS.

The final distro hop: NixOS

A coding colleague brought it to my attention, as he was interested in it and knew about my excessive doom-emacs usage. HLissner, the creator and maintainer of doom is also a NixOS user. Henrik has this funny answer on his dotfiles repo:

Why NixOS?

Because managing a fleet of servers, a hundred strong, is the tenth circle of hell without a declarative, generational, and immutable single-source-of-truth configuration framework like NixOS.

Sure beats the nightmare of brittle capistrano/chef/puppet/ansible/shell scripts I left behind.

Should I use NixOS?

Short answer: no.

Long answer: no really. Don’t.

Long long answer: I’m not kidding. Don’t.

Unsigned long long answer: Alright alright. Here’s why not:

  • Its learning curve is steep.
  • You will trial and error your way to enlightenment, if you survive the frustration long enough.
  • NixOS is unlike other Linux distros. Your issues will be unique and difficult to google. A decent grasp of Linux and your chosen services is a must, if only to distinguish Nix(OS) issues from Linux (or upstream) issues – as well as to debug them or report them to the correct authority (and coherently).
  • If words like “declarative”, “generational”, and “immutable” don’t put your sexuality in jeopardy, you’re considering NixOS for the wrong reasons.
  • The overhead of managing a NixOS config will rarely pay for itself with 3 systems or fewer (perhaps another distro with nix on top would suit you better?).
  • Official documentation for Nix(OS) is vast, but shallow. Unofficial resources and example configs are sparse and tend toward too simple or too complex (and most are outdated). Case in point: this repo.
  • The Nix language is obtuse and its toolchain is not intuitive. Your experience will be infinitely worse if functional languages are alien to you, however, learning Nix is a must to do even a fraction of what makes NixOS worth the trouble.
  • If you need somebody else to tell you whether or not you need NixOS, you don’t need NixOS.

If you’re not discouraged by this, then you didn’t need my advice in the first place. Stop procrastinating and try NixOS!

This intrigued me.

On a spare laptop I gave it a try. The installation of NixOS was super easy. But I had acquired some particular tastes: QTile. Configuring python dependencies for NixOS is still a daunting task for me, but after enough bashing my head against the wall it worked (with a nixpkgs overlay I believe).

Settling on NixOS

The beauty of nix is that if you configure something on one system, you can reuse that configuration on another. So the work on the spare laptop could easily be translated to my home machine.

The entire configuration of my machine could now be checked into my dotfiles repository! Adding the work machine was also not that hard, granted I used duct-tape-based methods to make it all work.

But nix allowed me to rely on the software that is installed and how its configured. It took away the issue of forgetting to instruct my computer about a configuration, because I would declare the configuration in a text file.

Switching to Flakes

Are they still experimental? Anyhow, flakes in nix are the future. When you are using them for a nix configuration, the flake creates a flake.lock alongside your flake.nix. This lock file pins a commit hash of the nixpkgs repository. With this commit hash you can actually reproduce the exact version of software across systems. Let that sink in.

Moreover, with a flakes setup you can have multiple machines share the same configuration in your repo. The system configuration can be modularized and so you can for example write a tool-belt.nix file that contains all the CLI tools you want to share across all computers.

Finally, I achieved the dream: my personal and work machine could share the same configuration. There was no more drift between the systems! I was able to also setup a home-server running with the same configuration and just omit all the desktop related packages.

Killer feature: Generations

The real killer feature of NixOS is the generations. Every time you change something about the config, you create a new “atomic” snapshot of the software and its version at that point in time. In the background all packages are installed in the /nix/store and just symlinked into a profile. Yes, this bloats the disc some, but you can always garbage collect.

Simply: When you boot your machine, you are presented with the choice to roll back to any previous generation.

[dramatic pause]

Do you have any idea how many times I busted my setup and started from scratch - as in, usb-drive, wipe the machine, install fresh, run my scripts, configure everything… Do you have any idea?!

With Nix, this is a non-issue. Power off, roll back, you’re good.

Damn.

Phase V: Nix verstehen

Or in English: “understand noting”. It’s a double-entendre, because “nix” in German means “nothing”, too.

The “Nix”-way of doing Linux is so different to what is already out there. But I believe that it’s the “right” way to configuration. When it finally “clicks”, for example when you build an existing configuration on a brand new machine and suddenly you are in your familiar environment, with everything down to the color scheme, font, shortcuts, bash aliases, wallpaper. In that moment you glimpse the greatness and potential of the Nix-way.

Flexing the nix muscles

To show off a little what conveniences I now get to enjoy:

home-manager - declare the user-space

Home Manager can be what manages the user-space on your machine. So not on a system level, but user-level. You can use it even in non-NixOS setups - looking at you MacOS people.

All user installed software, services, configuration and more can be configured with home-manager. When using NixOS you can simply plug it in to your system configuration. It allows a much finer grained controlled of the user environment.

hyprland & waybar - a modern environment

QTile bit the dust when I tried to switch to wayland. Apparently it supports it, but I couldn’t get it to work. Also, whenever QTile did break while tinkering, it left the system in a near-unusable state (learned about the tty this way).

Now my desktop environment - i.e. hyprland and some more packages, are declared in my flake. This is so cool!

When I find a cool waybar example from some other nix user, I can just copy+paste it!

nh - the nix helper

To have some visual sugar while updating the system, nh has you covered. Now, all you need is the nh os switch command, because nh takes the hostname of your machine and applies the same named flake part!

The YouTuber Vimjoyer has a video how to set it up.

stylix - theme everything

Ricing is usually only for folks that really have too much time on their hands (not excluding myself here). Because going through every single program and customizing the theme and get it right is nigh impossible.

What if there were a program that could do it all. Automatically.

Meet stylix.

This post is too long already, so just watch this video by Vimjoyer.

MVP: Vimjoyer

Speaking of whom… His YouTube channel is so unbelievably helpful. If you are considering giving Nix a try, you must watch the videos. You will not get a more up-to-date, concise nix on-boarding.

Epilog

Told you I had some adventures…

What can we now take away from this? Personally, I learned that pursuing my ambitions pays off. As I build my timeless tech-stack there is only one way: up. No matter how difficult the problem, with the tried-and-true approach Try => fail => formulate hypothesis why it fails => research => tweak steps. Repeat. nothing is unachievable.

This process teaches you about the technology you use. You become the master of your system. Able to determine every little detail of the setup. Navigating the computer becomes muscle memory and you are free to focus on what really matters.

All of this was a long-winded way of saying:

Check out my rice 😎