ZFS: Difference between revisions

m Added missing closing </syntaxhighlight> tag
Tags: Mobile edit Mobile web edit
Line 9: Line 9:
==== Latest kernel compatible with ZFS ====
==== Latest kernel compatible with ZFS ====


Newer kernels might not be supported by ZFS yet. If you are running a kernel which is not officially supported by zfs, the module will refuse to evaluate and show an error.
Newer kernels might not be supported by ZFS yet. If you are running a kernel which is not officially supported by ZFS, the module will refuse to evaluate and show an error. With that being said, NixOS does support a number of kernel versions that are compatible with ZFS, and while it is important to understand these details on compatibility, they should not be taken as a deterrent from using ZFS on NixOS.  


You can pin to a newer kernel version explicitly, but note that this version may be dropped by upstream and in nixpkgs prior to zfs supporting the next version. See [[Linux kernel]] for more information.<syntaxhighlight lang="nix">
You can pin to a newer kernel version explicitly, but note that this version may be dropped by upstream and in <code>nixpkgs</code> prior to zfs supporting the next version. See [[Linux kernel]] for more information, including which kernel versions <code>nixpkgs</code> provides.
 
<syntaxhighlight lang="nix">
{
{
   boot.kernelPackages = pkgs.linuxPackages_latest;
   boot.kernelPackages = pkgs.linuxPackages_latest;
Line 49: Line 51:
in
in
{
{
   # Note this might jump back and worth as kernel get added or removed.
   # Note this might jump back and forth as kernels are added or removed.
   boot.kernelPackages = latestKernelPackage;
   boot.kernelPackages = latestKernelPackage;
}
}