Open adisbladis opened 2 years ago
See also https://github.com/NixOS/nixpkgs/pull/59863 for previous discussions about the issue.
I'm using boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
on my machines with zfs without issues.
I'm using
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
on my machines with zfs without issues.
the point of this ticket is not getting a compatible kernel for use with zfs
Its that if you're not even using zfs you still have to set it to the zfs latestCompatibile etc kernel or remove it from boot.supportedFilesystems
by hand
Its that if you're not even using zfs you still have to set it to the zfs latestCompatibile etc kernel or remove it from boot.supportedFilesystems by hand
This is one of the issues with using a kernel module that lives outside of the kernel code base.
Either we should retain zfs
support, but delegate the kernel version to zfs; or we should remove zfs from the latest build; or we should just publish a zfs specific version.
Personally, I don't think most users will notice that the kernel version lags behind a week or two each kernel release. So I would prefer the "zfs
is included, and we have a slightly stale latest kernel until zfs gets updated" model.
Unless zfs gets added to the kernel, I don't think anyone is going to be happy in all cases.
I still think this solution proposed in the comments of the previously linked issue is the best:
We can have our cake and eat it too. Build new_kernel_without_zfs
and latest_kernel_with_zfs_support
. All the time.
Describe the bug
Having ZFS in https://github.com/NixOS/nixpkgs/blob/3f339f3cf44d090e2cc624f89df81fdb29810a0a/nixos/modules/profiles/base.nix#L54 is problematic as it breaks with
linuxPackages_latest
when ZFS isn't compatible with the latest kernel version.This profile is pulled in by the SD card builders & netboot, leaving users that want to build SD images with the latest kernel with a broken build and no obvious recourse how to resolve the issue.
Expected behavior
A working build no matter the kernel version.
Notify maintainers
cc @grahamc (who added ZFS to this profile) cc zfs maintainers @hmenke @jcumming @jonringer @wizeman @globin cc mobile nixos maintainer / resident aarch64 person @samueldr
Additional resources
NixOS wiki article pointing users to these files: https://nixos.wiki/wiki/NixOS_on_ARM#Installation There are also plenty of examples on Github, this is just a random sample: https://github.com/OptimisticShaggy/docker/blob/main/Nix%20OS/pi3/sd-img.nix