From 561f72cd9824116b6bbcba0f4bd0223b08c27579 Mon Sep 17 00:00:00 2001 From: Spotlight Date: Mon, 31 Mar 2025 11:07:04 -0500 Subject: [PATCH] cyclone: Use kernel 6.14 This additionally applies several overrides to use ZFS on 6.14. --- .../linux/cyclone/hardware-configuration.nix | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/hosts/linux/cyclone/hardware-configuration.nix b/hosts/linux/cyclone/hardware-configuration.nix index 926f248..925d068 100644 --- a/hosts/linux/cyclone/hardware-configuration.nix +++ b/hosts/linux/cyclone/hardware-configuration.nix @@ -14,17 +14,36 @@ }; initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; - # Use the latest kernel. - # As such, we'll also use unstable ZFS. - kernelPackages = pkgs.linuxPackages_6_13; + + # Where possible, we'd like to use the latest kernel version, + # alongside the latest version of ZFS. + # + # The latest version of ZFS (as of writing, 2.3.1) + # supports kernel 6.14 with no changes necessary. + # + # We'll temporarily override it to not mark it as broken. + kernelPackages = pkgs.linuxPackages_6_14.extend (final: prev: { + zfs_unstable = prev.zfs_unstable.overrideAttrs (oldAttrs: { + # Well.. that's partially a lie, it does need + # one patch to specify it's compatible. + patches = [ + (pkgs.fetchpatch { + url = "https://patch-diff.githubusercontent.com/raw/openzfs/zfs/pull/17172.patch"; + hash = "sha256-c8YP1a36uwYvvW+h4yT6s3PIKkHq6IMjVal2CcNI4p4="; + }) + ]; + meta.broken = false; + }); + }); + zfs = { - package = pkgs.zfs_unstable; + package = pkgs.zfs_unstable.overrideAttrs (oldAttrs: rec { + meta.broken = false; + }); # For reasons unbeknownst to humanity, this drive - # appears to keep changing identifiers or similar. - # Prefer by-partuuid instead. + # appeared to keep changing identifiers. # - # (We could also do by-uuid, but it'd be best not - # to have a drive's serial number publicly.) + # We're forcing its device to be read from by-uuid. devNodes = "/dev/disk/by-uuid"; };