nixos-hardware/microsoft/surface/common/kernel/linux-6.6.x/default.nix

32 lines
683 B
Nix
Raw Normal View History

2023-11-25 18:43:48 -05:00
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkOption types;
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage2 surfacePatches;
cfg = config.microsoft-surface;
2024-01-24 03:25:36 -05:00
version = "6.6.13";
2023-11-25 18:43:48 -05:00
kernelPatches = surfacePatches {
inherit version;
patchFn = ./patches.nix;
};
kernelPackages = linuxPackage2 {
inherit version kernelPatches;
sha256 = "sha256-iLiefdQerU46seQRyLuNWSV1rPgVzx3zwNxX4uiCwLw=";
ignoreConfigErrors=true;
2023-11-25 18:43:48 -05:00
};
in {
options.microsoft-surface.kernelVersion = mkOption {
type = types.enum [ version ];
};
config = mkIf (cfg.kernelVersion == version) {
boot = {
inherit kernelPackages;
};
};
}