Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 6m47s
Check NixOS configurations / eval-hosts (push) Failing after 6m47s
This commit is contained in:
@@ -3,8 +3,22 @@
|
|||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
{ config, lib, pkgs, inputs,... }:
|
{ config, lib, pkgs, inputs,... }:
|
||||||
|
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
|
||||||
{
|
{
|
||||||
|
# Note this might jump back and forth as kernels are added or removed.
|
||||||
|
boot.kernelPackages = latestKernelPackage;
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
../../common/configuration.nix
|
../../common/configuration.nix
|
||||||
|
|||||||
Reference in New Issue
Block a user