2023-11-25 23:43:48 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2024-01-31 08:32:59 +00:00
|
|
|
inherit (lib) mkIf mkOption;
|
2023-11-25 23:43:48 +00:00
|
|
|
|
2024-01-31 08:36:14 +00:00
|
|
|
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfEnum;
|
2023-11-25 23:43:48 +00:00
|
|
|
|
|
|
|
cfg = config.microsoft-surface;
|
|
|
|
|
2024-03-29 02:27:09 +00:00
|
|
|
version = "6.6.25";
|
2023-11-25 23:43:48 +00:00
|
|
|
kernelPatches = surfacePatches {
|
|
|
|
inherit version;
|
|
|
|
patchFn = ./patches.nix;
|
|
|
|
};
|
2024-01-30 23:00:03 +00:00
|
|
|
kernelPackages = linuxPackage {
|
2023-11-25 23:43:48 +00:00
|
|
|
inherit version kernelPatches;
|
2024-03-29 02:27:09 +00:00
|
|
|
sha256 = "0i0zvqlj02rm6wpbidji0rn9559vrpfc1b8gbfjk70lhhyz11llr";
|
2024-01-16 17:41:29 +00:00
|
|
|
ignoreConfigErrors=true;
|
2023-11-25 23:43:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
|
|
|
options.microsoft-surface.kernelVersion = mkOption {
|
2024-01-31 08:36:14 +00:00
|
|
|
type = versionsOfEnum version;
|
2023-11-25 23:43:48 +00:00
|
|
|
};
|
|
|
|
|
2024-01-31 08:32:59 +00:00
|
|
|
config = mkIf (isVersionOf cfg.kernelVersion version) {
|
2023-11-25 23:43:48 +00:00
|
|
|
boot = {
|
|
|
|
inherit kernelPackages;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|