Skip to content

ZFS enabled in nixos/modules/profiles/base.nix breaks linuxPackages_latest #189184

Open

Description

@adisbladis

Describe the bug

Having ZFS in

boot.supportedFilesystems = [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "zfs" "ntfs" "cifs" ];
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

Activity

  1. added
    0.kind: bug
    on Aug 31, 2022
  2. samueldr commented on Aug 31, 2022

    @samueldr
    Member

    See also #59863 for previous discussions about the issue.

  3. misuzu commented on Sep 1, 2022

    @misuzu
    Contributor

    I'm using boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; on my machines with zfs without issues.

  4. 06kellyjac commented on Sep 1, 2022

    @06kellyjac
    Member

    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

  5. jonringer commented on Sep 1, 2022

    @jonringer
    Contributor

    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.

  6. samueldr commented on Sep 1, 2022

    @samueldr
    Member

    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.

  7. added
    6.topic: nixos
    on Sep 5, 2022
  8. added
    2.status: stale
    on Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug2.status: stale6.topic: nixos

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions