Bcachefs with future kernel versions

I’m using bcachefs right now, but I heard it’s going to be removed from the upstream kernel in the upcoming 6.18 release, and I’m wondering if I need to do anything to keep it.

I checked the wiki, as well as around this forum, but there doesn’t seem to be any info related to this yet (unless I missed it).

Does anyone know what steps I should take to make sure I still have bcachefs in the future?

1 Like

The configuration mentioned in the wiki is correct: boot.supportedFilesystems = [ "bcachefs" ];

On NixOS 25.11 and unstable, this will load the out of tree bcachefs kernel module. This change does not appear to have been backported to NixOS 25.05, so I would not upgrade to Linux 6.18 while you are still on 25.05. See comment below.

1 Like

We’ve already done the work to move to the out-of-tree module, and have disabled the in-tree module altogether.

And this should for the most part require no migration from users. Simply having a bcachefs device in fileSystems, or having boot.supportedFilesystems = [ "bcachefs" ]; will cause NixOS to install the out-of-tree module

6 Likes

It was, actually. Just in its own batch rather than with the normal backport flow, because we weren’t sure we wanted to do this until it became clear we would eventually have to support 6.18 on 25.05: [Backport release-25.05] bcachefs-tools: 1.31.0 -> 1.31.6; Bcachefs out of tree module, Bcachefs package and scrub nixos option by JohnRTitor · Pull Request #448195 · NixOS/nixpkgs · GitHub

3 Likes

Wow! Shout out to all the folks made that transition unnoticeable! I had no clue it had already happened on my system. I guess that’s the magic of declaring your dependencies amirite?

5 Likes