Closed PowerUser64 closed 2 weeks ago
I manually set boot.loader.generic-extlinux-compatible.enable
to false with lib.mkForce to avoid the second error, and now my pi won't boot :face_with_diagonal_mouth:
I'm recovering it, with the main disk hooked up to my desktop. I'm not 100% sure what to do to satisfy nix here, but I'll post updates here as I go.
Still battling the same errors as mentioned before. Resolving the first one by setting boot.loader.generic-extlinux-compatible.enable
(with mkForce) to false leads to no boot, and setting it to true causes the second error above. I can't resolve the second error by setting system.build.installBootLoader
to anything because it causes another error saying the option doesn't exist.
Turns out rpi-nix looks at the uboot option, and sets boot.loader.generic-extlinux-compatible.enable
as well as boot.loader.initScript.enable
automatically. nixpkgs looks at boot.loader.initScript.enable
as its way of knowing whether to set this mysterious system.build.installBootLoader
option.
I have uboot disabled (the default), which should cause rpi nix to disable both initScript
and generic-extlinux-compatible
. This causes nixpkgs to disable system.build.installBootLoader
... I'm going crazy trying to figure this out lol.
Anyway, what's happening is rpi-nix wants to enable an option (generic-extlinux-compatible
), but nixpkgs wants it disabled. mkForcing the option to be disabled causes my pi to not boot, so I need to mkForce it to be enabled. But, if I do that, an internal nixpkgs option gets set for me (declaration: system.build.installBootLoader
- set here) to a value that conflicts with one that rpi-nix changes through initScript
. This feels like a circular dependency tree of things being broken and I don't know how to fix it.
Sorry if this reads more like a journal entry than a github issue, I'm trying to process what's going on and these are my observations.
@tstat I'm really lost with this, do you have any insight?
I'm not sure if I can salvage the boot disk, I'm going to rebuild it from scratch and copy files over. It's not that big of a deal because I've been meaning to start from a fresh nix config for a while now. Just means more downtime.
By the way, @tstat it might be a good idea to mention somewhere in the readme that you need to set networking.networkmanager.plugins = lib.mkForce []
or else you have to build webkitgtk (in my experience). Found this using nix-tree.
UPDATE: It's working now! I'm pretty sure the problem was that I had a really old eeprom version (from 2020). I think the eeprom I had wasn't compatible with booting with the extlinux options, and the recent removal of u-boot caused my system to break. Either way, I've updated the bootloader to the latest version following these steps on the nixos wiki and now I can boot!
I haven't tested booting with rpi-nix yet, but I'm pretty sure if I tried now it would work.
I was updating my system, when I got the following error:
The first file listed in the error is from raspberry-pi-nix, and the second one is from nixpkgs. It seems that raspberry-pi-nix tries to set a value that nixpkgs also sets. I solved this by using
lib.mkForce
in my config, but it seems like something that should be solved in rpi nix or nixpkgs. I only started getting this error recently. Any idea where this should be solved?Update: I'm now getting a subsequent error:
Not sure if I can lib.mkForce my way out of this one.