Several things here:
-
Changing util-linux system-wide is very non-trivial, because too many things depend on it. You can do it in an overlay, but you will end up re-compiling half of nixpkgs. Instead of putting it in an overlay, you can just put it in
systemPackages
, but then the important things like systemd won’t use it. -
nixos-23.11 shipped the patch for 2.39.2 since the reddit post you linked. So you’ve got the fix already.
-
nixos-23.11 recently updated to 2.39.3 anyway, so you definitely already have it fixed. -
The problems with multi-device bcachefs go much further than this, and that’s most likely why you’re having trouble mounting it on boot. This is just a limitation in systemd currently . There’s also a nixpkgs issue about it. TL;DR: If you use
UUID=...
in fstab, systemd wants to wait for only one device and then pass that device alone to the mount CLI, which doesn’t work. If you use/dev/foo:/dev/bar
, systemd wants to wait for a single device whose name is/dev/foo:/dev/bar
rather than two separate devices. I’m looking into fixes for this problem myself. -
Actually, you don’t have to use the lettered names. You can use like
/dev/disk/by-id/foo
which doesn’t change on reboot. You can’t use/dev/disk/by-uuid
though because all the devices share a UUID so only one gets the link in there.
In the meantime, you probably just have to make a custom service that runs the mount
command itself. Here’s some more discussion on here about this: How do I mount multiple bcachefs devices on boot?