2023-11-26 00:43:48 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) mkIf mkOption types;
|
|
|
|
|
2024-01-31 00:00:03 +01:00
|
|
|
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches;
|
2023-11-26 00:43:48 +01:00
|
|
|
|
|
|
|
cfg = config.microsoft-surface;
|
|
|
|
|
2024-01-24 09:25:36 +01:00
|
|
|
version = "6.6.13";
|
2023-11-26 00:43:48 +01:00
|
|
|
kernelPatches = surfacePatches {
|
|
|
|
inherit version;
|
|
|
|
patchFn = ./patches.nix;
|
|
|
|
};
|
2024-01-31 00:00:03 +01:00
|
|
|
kernelPackages = linuxPackage {
|
2023-11-26 00:43:48 +01:00
|
|
|
inherit version kernelPatches;
|
2024-01-30 23:53:54 +01:00
|
|
|
sha256 = "sha256-iLiefdQerU46seQRyLuNWSV1rPgVzx3zwNxX4uiCwLw=";
|
2024-01-16 18:41:29 +01:00
|
|
|
ignoreConfigErrors=true;
|
2023-11-26 00:43:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
|
|
|
options.microsoft-surface.kernelVersion = mkOption {
|
|
|
|
type = types.enum [ version ];
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf (cfg.kernelVersion == version) {
|
|
|
|
boot = {
|
|
|
|
inherit kernelPackages;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|