NixOS
1. NixOS
NixOS is a very interesting Linux distribution and in spite of me shitting on it some time ago and saying it's not much better than any other distributions, I found it using myself as a daily driver now and it's not as bad as I remembered it to be.
First off, flakes are great and I put them in every project where I have to deal with depedencies. They are clearly a better method of managing depedencies and akin to what virtual environments in Python's pip do (it works completely different, but the concept of having depedencies for one project contained within that one project without coming in conflict with other packages is what I mean).
Other than flakes, the nix packages manager also makes it possible to have a whole system declared in one or a few files and, you might think "I'm no fuaarrrking distro-hopper. I set up my OS once and then never again for the rest of my life", which is fine, but you have to consider that even then, your system might break, and you can just roll back to the old version of your config if you desire so, making it – ironically so – less tinkering-intense than Gentoo or similar distributions, because in practice you don't change your config all the time rather than just editing it once in a while and going on with your life. You can, supposedly, set up Emacs and Firejail with nix, which would be very nice, but I never got it working right, for now, but I will look into it some time soon. The idea of having all your configuration in one place is nice, however.
Another neat thing is that NixOS integrates very well with ZFS. I've never used ZFS out of fear that it being outside the kernel might be cause difficulties: Not so on NixOS! ZFS (with native encryption) works great and I feel stupid for not having tried it earlier. Too bad bcachefs is not in the kernel, otherwise I would have used that, but it is what it is.
As much as I praise NixOS, NixOS also has some ugly sides and rough edges, namely that it's inseparable from systemd and as such you will find yourself relying on systemd a lot. There is no way around it and as configurable as NixOS is, systemd is here to stay. On the other hand, I learned to see the good sides of systemd too. The systemd bootloader is easier to set up and work with than Grub and probably also less bloated as a whole. It boots encrypted ZFS with just 3 lines in the configuration file and is rather reliable. It's a really ugly solution – technologically and ideally – but it works fine and doesn't get in your way, so with NixOS you have to either be pragmatic or clinge to your idealism and use Gentoo or something else (like GUIX, which has a free as in freedom parental control thingy so little timmy doesn't install proprietary software while his parents are out eating and no nanny is around).
1.1. 1. Further notes
One very interesting aspect of NixOS is that getting a x8664-elf cross-compiler toolchain is trivial and you don't have to compile it yourself, let alone use shady scripts. So you're well equipped for OSDev and won't need to compile GCC + Binutils yourself. Neat!
This is my flake.nix for Sehnsucht-system and it works really neatly. See that "pkgs.Cross.x8664-embedded"? That's a bare metal cross-compiler. Just type "nix develop" in the shell of your choice and it just werks(tm).
{
description = "blablabalbalaablaablaabal";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
crossPkgs = pkgs.pkgsCross.x86_64-embedded;
in
{
devShells.${system}.default = pkgs.mkShell {
packages = [
crossPkgs.buildPackages.gcc
crossPkgs.buildPackages.binutils
pkgs.limine-full
pkgs.mtools
pkgs.dosfstools
pkgs.qemu
pkgs.clang-tools
pkgs.git
pkgs.gnumake
pkgs.doxygen
pkgs.parted
pkgs.lua
];
};
};
}
Created: 2026-10-28 Mi 14:48