NULCODE

NixOS installation

Installation

For a long time I wanted to give NixOS a try. I finally got into it.

So, the first step are just like a normal distribution: dd an iso on a USB stick and you’re good to go. (yes, you can boot over network too to flex around; that’s on my list).

As I’m lazy, I took the graphical installation. Then, as an expert, I clicked next > next > next > reboot.

Packages installation

The main config file seems usable, the comments provide a fair quick reference.

This pointed me right to the keyboard layout -> I can type instead of looking at my keyboard… which has no printed keys.

The packages installation is really clean in my opinion: just list what to install. I find this way neat as you instantly see which packages you installed.

I know, package managers can list installed packages (we can depress together if you’re using a Debian based distribution: apt list --installed reports more than 3k installed packages on my system).

The point of having a list screaming at you is to ponder if you need the bloat you’re not using while scrolling it. (I’m a maniac keeping this kind of lists alphabetically sorted if you wondered).

That said, let’s add i3 for me to not jump through the window (pun intended) attempting to use a mouse. And the moment of truth: sudo nixos-rebuild switch Works as promised, nice!

Let’s then add ghostty (always wanted to really give this terminal emulator a shot). Now I’m no longer dying from xterm with black on nuclear blast light. So, a paranoiac rebuild + power cycle, to see that everything works as expected (to be fair, we’re talking about the package manager of the OS, no big wonder it just works).

With the emergency topics off the way, I can use my brain to think about packages, no longer about brightness. So, I added a bunch of packages (something between the lines: nvim, emacs, zig, gcc), rebuild… forever …

With the CPU going 100% (guessed from the fan noise at least). Untils boom! The terminal just closed. Wondering about the stability of ghostty (I needed a culprit), I retried, same issue.

After some trivial monitoring during the build, the CPU went indeed berserk, and the RAM went low, dangerously low. On terminal crash, checking the system logs, journalctl happily repported the Out Of Memory Killer kicked in…

Searching around in the man to discover that --cores --max-jobs --show-trace may be useful with sound values. … Until after a few Out Of Memory issues I though (“hey, come on in 2026, mutli-core is a far too new fancy technology so, let’s use 1 core and 1 job”). Taking forever, while the RAM usage continued to raise I searched for another solution and, good news, it’s a known issue, no worries… just need a swap.

Dooming myself for not having thinking during the installation, I then saw the swap is actually a file (nice!). Ok, so with a swap, everything’s building fine \o/

But why is anything being built in the first place? I mean, it is really good to have the option to build from sources, but often your package manager defaults to build from sources XOr download, so ok, Nix does both… but depending on what.

Sorry I don’t know yet why, but it’s really triggering me, so I’ll need to investigate xD

Summary of the first steps

I took a few good decisions (yes, this happens sometimes). Concretely:

Next steps

The installation opened a scarry number of rabbit holes (flakes? overlays? Nix? Normal user? Home manager? What is nixos-rebuild doing and why? …?).

A lot of topics remains, for instance I want to configure some packages, let’s say a trivial .bashrc I feel this should not be done through a classic scp another_machine:.bashrc . So I’ll need to find the Nix way, but that will be for another post.

Post list