1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-28 04:29:45 +01:00
nixos-hardware/microsoft/surface/common/kernel/linux-6.10.x/default.nix

32 lines
712 B
Nix
Raw Normal View History

2023-11-26 00:43:48 +01:00
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkOption;
2023-11-26 00:43:48 +01:00
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfEnum;
2023-11-26 00:43:48 +01:00
cfg = config.microsoft-surface;
2024-08-08 20:16:17 +02:00
version = "6.10.3";
2023-11-26 00:43:48 +01:00
kernelPatches = surfacePatches {
inherit version;
patchFn = ./patches.nix;
};
kernelPackages = linuxPackage {
2023-11-26 00:43:48 +01:00
inherit version kernelPatches;
2024-08-08 20:16:17 +02:00
sha256 = "1666dypfg193l5460maadki4hc291hr7k9fw74nq21fxczyj4pzs";
ignoreConfigErrors=true;
2023-11-26 00:43:48 +01:00
};
in {
options.microsoft-surface.kernelVersion = mkOption {
type = versionsOfEnum version;
2023-11-26 00:43:48 +01:00
};
config = mkIf (isVersionOf cfg.kernelVersion version) {
2023-11-26 00:43:48 +01:00
boot = {
inherit kernelPackages;
};
};
}