I spent part of yesterday and today re-organizing my flake to make a more logical file structure. Then I did a nixos-rebuild boot and loaded into the new generation. I noticed several things. First, there was a FAILED which flew by. Next, upon entering my password in the logon manager the screen went back to black, showed a few more init messages, followed by the KDE logo spinning a bit before my desktop appeared.
After that, no more WiFi, no more Bluetooth. Turning on BT in the GUI does nothing, the WiFi adapter does not even exist any more.
So, I went back to the previous generation. Everything worked. I did a nixos-rebuild boot of that previous generation. It took less than a second and actually did nothing more than pointing the symbolic link to the already broken generation, it did not create a new generation.
So I did an rm on that broken generation link and did another nixos-rebuild boot. Once again it took less than a second but this time created a new generation. I rebooted. FAILED during boot, spinning KDE icon, no Bluetooth, No WiFi. Nothing changed. It’s the EXACT same configuration as the working generation.
I would conclude that a persistent file somewhere is to blame. But then why does the older generation still work fine?
I have no idea what happened or how to fix it. Please help.
EDIT: With my limited skillset, looking in journalctl it looks like all the firmware loads are failing, followed by home manager for some reason. A whole bunch of Direct firmware load for XXX failed with error -2. For BT it gives that error then tells me the firmware file was not found. The WiFi chip I think has that error followed by failed to early request. The GPU has a bunch as well.
Well, I found it. hardware.enableRedistributableFirmware = true; wasn’t in there.
That said, it was not in the previous configuration either, only this one: cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
But that is the thing. That option was not defined in my previous working generation either, it has never been defined. I don’t know what is stranger, the fact that it worked all this time or that it broke now.
Even so, comparing would not have done much good. I did not update the flake so nothing changed on that end, and I shuffled so much around git would have simply told me I created a bunch of new files and deleted the originals. I relied on a two-step process, first moving and commenting, then removing the commented code after double-checking.
The only thing not present in the new config was the imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; from the original hardware-configuration.nix.
Anyways, I guess I’ll set my reply as the solution.
Ah, String concatenation, should have noticed that. I was a bit stressed with NixOS still having too many unknowns for me and having been trying to switch over from Windows for pretty much years now. Something always seems to be just a little off or a little challenging.