Another NixOS success story

Read another NixOS success story here, about how I updated my kernel and removed the old graphics driver and using another one in one step.

And I didn’t even care about the fact that my system maybe wasn’t bootable afterwards.

Indeed, that’s NixOS awesomeness. So, the problem is, I have an AMD graphics card in my workstation at home. I was on kernel 3.18 a rather long time. I mean, I was on 3.18 from 3.18.1 to 3.18.whatisitatthemoment - I guess I was there until 3.18.16 or something!

I used the ati_unfree driver in my system, so it wasn’t appropriate for Christmas and holy St. GNUcius. I wanted to fix this. Kernel 4.3 will have the free AMD driver infrastructure, but it isn’t out there right now, so I thought of updating to kernel 4.2 with the ati_unfree driver package. But it didn’t work, ati_unfree couldn’t be build on my system. I don’t know why and I actually do not care.

So here’s what I did:

I removed the ati_unfree driver from my services.xserver.videoDrivers setting and set it to [ "ati" "nouveau" ] - each of the drivers listed will be loaded and tested, told me the description of this option. I then did a nixos-rebuild build run, to verify it builds. It did. So I updated the kernel to boot.kernelPackages = pkgs.linuxPackages_4_2; and did a nixos-rebuild switch (actually I used my awesome nixos-scripts for this), but yeah…

And then I rebooted. I didn’t even have to think about potential breakage, I just tried to boot the new system. If it would have been unbootable, I would just boot into an older generation and instantly be back on my kernel 4.1 and ati_unfree driver I used before the update.

This is what I call NixOS awesomeness.