Collisions during installing NixOS

During installing NixOS from another Linux system, I get multiple warnings referring to “collisions”, apparently all related to firmware. This raises some questions on my side:

  • What does “collision” mean in this context? (I thought with Nix “nothing collides”.)
  • What problems may these collisions cause?
  • How can these collisions be prevented?

Collisions are paths that collide in a symlinkJoin when nix combines multiple derivations into one symlink tree.

If done correctly but since nix is a programming language anything can be changed and broken if you program it but it is somewhat hard if you don’t know how to break it.

If the files differ in content you could get the wrong one. Nix will usually abort if such a case happens.

For example man paths have almost always collisions which can be ignored. In other symlinkJoins one of the paths could be removed or changed to no longer collide.

2 Likes

The collision warnings I got are apparently all related to firmware. Is this usual? Problematic?

You mean like

 ➜ nix log /nix/store/53bvd4ld4a11nf5jar53n9c98nxcmn58-firmware
warning: collision between `/nix/store/af325xkq4ybwf6xp6hcq7d9xi4klb05r-rtl8723bs-firmware-2017-04-06-xz/lib/firmware/rtlwifi/rtl8723bs_nic.bin.xz' and `/nix/store/l46vysd17av6ayg2nx48a1za4n3p6pla-linux-firmware-20230210-xz/lib/firmware/rtlwifi/rtl8723bs_nic.bin.xz'
warning: collision between `/nix/store/af325xkq4ybwf6xp6hcq7d9xi4klb05r-rtl8723bs-firmware-2017-04-06-xz/lib/firmware/rtlwifi/rtl8723bs_wowlan.bin.xz' and `/nix/store/l46vysd17av6ayg2nx48a1za4n3p6pla-linux-firmware-20230210-xz/lib/firmware/rtlwifi/rtl8723bs_wowlan.bin.xz'
warning: collision between `/nix/store/bzabdk6vv5ld9s0qcscwxlg9fh3rq3d9-rtl8761b-firmware-xz/lib/firmware/rtl_bt/rtl8761b_config.bin.xz' and `/nix/store/l46vysd17av6ayg2nx48a1za4n3p6pla-linux-firmware-20230210-xz/lib/firmware/rtl_bt/rtl8761b_config.bin.xz'
warning: collision between `/nix/store/bzabdk6vv5ld9s0qcscwxlg9fh3rq3d9-rtl8761b-firmware-xz/lib/firmware/rtl_bt/rtl8761b_fw.bin.xz' and `/nix/store/l46vysd17av6ayg2nx48a1za4n3p6pla-linux-firmware-20230210-xz/lib/firmware/rtl_bt/rtl8761b_fw.bin.xz'
warning: collision between `/nix/store/6pxrmpmnvwkfsi9fd6vc6q29lm6l9ml7-rtw88-firmware-unstable-2022-11-05-xz/lib/firmware/rtw88/rtw8723d_fw.bin.xz' and `/nix/store/l46vysd17av6ayg2nx48a1za4n3p6pla-linux-firmware-20230210-xz/lib/firmware/rtw88/rtw8723d_fw.bin.xz'
warning: collision between `/nix/store/6pxrmpmnvwkfsi9fd6vc6q29lm6l9ml7-rtw88-firmware-unstable-2022-11-05-xz/lib/firmware/rtw88/rtw8821c_fw.bin.xz' and `/nix/store/l46vysd17av6ayg2nx48a1za4n3p6pla-linux-firmware-20230210-xz/lib/firmware/rtw88/rtw8821c_fw.bin.xz'
warning: collision between `/nix/store/6pxrmpmnvwkfsi9fd6vc6q29lm6l9ml7-rtw88-firmware-unstable-2022-11-05-xz/lib/firmware/rtw88/rtw8822c_wow_fw.bin.xz' and `/nix/store/l46vysd17av6ayg2nx48a1za4n3p6pla-linux-firmware-20230210-xz/lib/firmware/rtw88/rtw8822c_wow_fw.bin.xz'
warning: collision between `/nix/store/6pxrmpmnvwkfsi9fd6vc6q29lm6l9ml7-rtw88-firmware-unstable-2022-11-05-xz/lib/firmware/rtw88/rtw8822b_fw.bin.xz' and `/nix/store/l46vysd17av6ayg2nx48a1za4n3p6pla-linux-firmware-20230210-xz/lib/firmware/rtw88/rtw8822b_fw.bin.xz'
warning: collision between `/nix/store/6pxrmpmnvwkfsi9fd6vc6q29lm6l9ml7-rtw88-firmware-unstable-2022-11-05-xz/lib/firmware/rtw88/rtw8822c_fw.bin.xz' and `/nix/store/l46vysd17av6ayg2nx48a1za4n3p6pla-linux-firmware-20230210-xz/lib/firmware/rtw88/rtw8822c_fw.bin.xz'
created 413 symlinks in user environment

That should be mostly harmless and I think at least one of them is fixed in unstable soonish.

Yes, those are the kind of messages I’m getting. So they are mostly harmless? What harm can they still indicate?

The upstream linux-firmware package and some downstream package provide the firmware files. Usually they are duplicated and the same.