Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The lack of swift support for new kernels in OpenZFS has been a pain point for many years and there is no sign of the situation changing any time soon. This has lead to the creation of the fundamentally flawed zfs.latestCompatibleLinuxPackages and created friction when removing EOL and massively insecure kernels from Nixpkgs because users are forced to rely on them for ZFS support (https://discourse.nixos.org/t/aggressive-kernel-removal-on-eol-in-nixos/23097/). To prevent users from unknowingly running into this issue, this commit adds an eval warning, informing the user that what they're doing is very likely to cause issues down the line and that they will receive no support from us when that happens. This effectively deprecates usage of the ZFS package with non-LTS kernels. A new override option is introduced to disable the warning should the user choose to ignore it as to not annoy them. This trace warning could be upgraded to a throw/assert if it does not show the desired effect on users. I'd have preferred to have this warning only appear after e.g. broken checks but I couldn't think of a good way of implementing that. The idea to add this warning is the result of a discussion at the 2024-12-02 Darmstadt NixOS Meetup between ma27 (Linux kernel package maintainer), hexa, maralorn, a few further ZFS users and yours truly but no ZFS maintainer has been involved until proposing these patches. I myself do not use ZFS anymore (in part due to the lack of upstream support for new kernels) nor maintain it. I have made extensive use of it before though and have seen enough ZFS users run into trap.
- Loading branch information