yggdrasil: evaluate which kernel to use to match zfs
This commit is contained in:
parent
c6f586c40c
commit
c9a96b0f22
1 changed files with 14 additions and 1 deletions
|
|
@ -6,11 +6,24 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
zfsCompatibleKernelPackages = lib.filterAttrs (
|
||||
name: kernelPackages:
|
||||
(builtins.match "linux_[0-9]+_[0-9]+" name) != null
|
||||
&& (builtins.tryEval kernelPackages).success
|
||||
&& (!kernelPackages.${config.boot.zfs.package.kernelModuleAttribute}.meta.broken)
|
||||
) pkgs.linuxKernel.packages;
|
||||
latestKernelPackage = lib.last (
|
||||
lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)) (
|
||||
builtins.attrValues zfsCompatibleKernelPackages
|
||||
)
|
||||
);
|
||||
in
|
||||
{
|
||||
|
||||
boot = {
|
||||
zfs.package = pkgs.zfs_2_4;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelPackages = latestKernelPackage;
|
||||
extraModulePackages = with config.boot.kernelPackages; [ r8125 ];
|
||||
blacklistedKernelModules = [ "r8169" ];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue