zfsUnstable: disable kernel compatibility checks#145485
zfsUnstable: disable kernel compatibility checks#145485hmenke wants to merge 1 commit intoNixOS:masterfrom
Conversation
With this change zfsUnstable has all kernel compatibility checks disabled. This allows using zfsUnstable with kernels that have not been marked compatible by upstream.
|
Can't we put this behavior behind a flag? This seems pretty risky tbh. |
|
What kind of flag are you thinking about? |
|
@Ma27 This behavior is already behind the flag |
|
Considering how
Throwing away all compatibility checks IMHO contradicts with this.
Idk, |
Where should this go inside |
|
This is the minimal overlay that you need to override something in { config, pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.zfs.enableUnstable = true;
nixpkgs.overlays = [
(self: super: {
linuxPackages_latest = super.linuxPackages_latest.extend (linuxPackagesSelf: linuxPackagesSuper: {
zfsUnstable = linuxPackagesSuper.zfsUnstable.override {
#...
};
});
zfsUnstable = super.zfsUnstable.override {
# ...
};
})
];
} |
I disagree with this statement. The way I see |
I'd be fine with this if it gets documented somewhere.
Well, if users want to use zfs against a kernel that's (not yet) officially supported, they are free to do so via e.g. an overlay as you demonstrated it above. But we as a distro should adhere to what upstream says IMHO. |
That used to be my stance as well but recently every two weeks or so someone shows up whining that they cannot use the latest kernel with ZFS. |
|
FWIW, I encountered this issue while trying to build an ISO image with the |
tbh that's better than people whining about fs issues because NixOS didn't stop them from installing zfs with an incompatible kernel. Yes, it may be fine in most of the cases if only the compatible version-range has to be updated, but that's not always the case and we as a distro shouldn't make guarantees upstream can't make (yet). I have to admit that I didn't know of the overlay-approach you posted above, so I'd suggest we put this into the manual and point everyone to it if they're unhappy. |
Motivation for this change
With this change zfsUnstable has all kernel compatibility checks disabled. This allows using zfsUnstable with kernels that have not been marked compatible by upstream.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)