From 4d68c90e305e8f4882384988be178eb95439723b Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Thu, 10 Nov 2022 10:13:55 -0500 Subject: [PATCH] get newer kernel working --- hosts/levi/optimus.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hosts/levi/optimus.nix b/hosts/levi/optimus.nix index 3fa06ae..f6033a6 100644 --- a/hosts/levi/optimus.nix +++ b/hosts/levi/optimus.nix @@ -2,10 +2,17 @@ let current-mode = "nvidia-mux"; + # remove after pkgs.zfs.latestCompatibleLinuxPackages is 6.x + zfs-needs-fixing = builtins.substring 0 2 pkgs.zfs.latestCompatibleLinuxPackages.kernel.version == "5."; + constants = { hardware.nvidia.prime.intelBusId = "PCI:0:2:0"; hardware.nvidia.prime.nvidiaBusId = "PCI:1:0:0"; - boot.kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages; + boot.kernelPackages = + if zfs-needs-fixing + then pkgs.linuxPackages_6_0 + else pkgs.zfs.latestCompatibleLinuxPackages; + boot.zfs.enableUnstable = zfs-needs-fixing; }; available-modes = {