Nixos-rebuild reboot --upgrade-all fails: graphics-drivers.drv

I’ve put the complete error dump at the bottom.

I was performing my normal update process…

sudo nixos-rebuild switch --upgrade-all --show-trace

When I got the message. I typically update every month, however, it’s probably been two months.

So, nothing really major changed, same workstation, no new hardware, no channel changes, just a normal update.

x sudo nix-channel --list nixos https://channels.nixos.org/nixos-24.11 nixos-hardware https://github.com/NixOS/nixos-hardware/archive/master.tar.gz unstable https://nixos.org/channels/nixos-unstable

The nixos-hardware ‘was/is’ required because of the raphael igpu in the Ryzen 7940HS in my workstation wasn’t supported without it. It’s been there since my initial install.

x inxi CPU: 8-core AMD Ryzen 9 7940HS w/ Radeon 780M Graphics (-MT MCP-) speed: 2857 MHz Kernel: 6.12.18 x86_64 Up: 1d 23h 8m Mem: 47.49/61.61 GiB (77.1%) Storage: 1.79 TiB (91.5% used) Procs: 596 Shell: Bash inxi: 3.3.35

Error Dump

error: builder for ‘/nix/store/aaisl1rishf4g6fgkqyr8fqcwivjf1sq-graphics-drivers.drv’ failed with exit code 25
error: 1 dependencies of derivation ‘/nix/store/sz908iva1ppm92djchkk2v36wnbqf0nn-graphics-driver.conf.drv’ failed to build
building ‘/nix/store/b0rmpxrakxp7c2hd2rb2hwb6dcx1h8vk-etc-profile.drv’…
error: 1 dependencies of derivation ‘/nix/store/f32r6hv5y97jh15vrm16m539hapwmwri-tmpfiles.d.drv’ failed to build
building ‘/nix/store/sr4ij8jd72271q3ma2zip8rci5f4l7qj-xserver-wrapper.drv’…
error: 1 dependencies of derivation ‘/nix/store/kz7hss0zv0a1bbmvijmvs9ngn0msi2mz-etc.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/n78dvcz8v19fbx3df7ndskw6xvnmsl2h-nixos-system-nixboss-24.11.716793.a880f49904d6.drv’ failed to build

Could you share just the error message instead of the full trace? Sounds like it’ll be a corrupted store or disk space issues.

If you do want to share the full trace, use triple backticks on separate lines above and below it. And make sure you actually paste all of it.

error: builder for ‘/nix/store/aaisl1rishf4g6fgkqyr8fqcwivjf1sq-graphics-drivers.drv’ failed with exit code 25
error: 1 dependencies of derivation ‘/nix/store/sz908iva1ppm92djchkk2v36wnbqf0nn-graphics-driver.conf.drv’ failed to build
building ‘/nix/store/b0rmpxrakxp7c2hd2rb2hwb6dcx1h8vk-etc-profile.drv’…
error: 1 dependencies of derivation ‘/nix/store/f32r6hv5y97jh15vrm16m539hapwmwri-tmpfiles.d.drv’ failed to build
building ‘/nix/store/sr4ij8jd72271q3ma2zip8rci5f4l7qj-xserver-wrapper.drv’…
error: 1 dependencies of derivation ‘/nix/store/kz7hss0zv0a1bbmvijmvs9ngn0msi2mz-etc.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/n78dvcz8v19fbx3df7ndskw6xvnmsl2h-nixos-system-nixboss-24.11.716793.a880f49904d6.drv’ failed to build

That still doesn’t contain the actual error.

Ah, this looks like the culprit.

error: collision between `/nix/store/xylg7c2w19n7lpvc7xs3zgkh5is934lv-mesa-25.0.3/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json' and `/nix/store/bhp0fdci3f662hiklc074nw13i0xyd1f-mesa-24.2.8-drivers/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json'

Yep, you’re installing two versions of the same driver somehow. You can use nix why-depends to figure out why.

The problem was that I was installing the mesa package from unstable but was also setting ‘hardware.graphics.enable = true’ which was installing mesa from stable.

No need to install mesa directly and no need to use the unstable version anymore as was required over a year ago for raphael igpu.

Thank you TLATER!