mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-08 12:09:40 +01:00
31 lines
715 B
Nix
31 lines
715 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
inherit (lib) mkIf mkOption;
|
|
|
|
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfOption;
|
|
|
|
cfg = config.microsoft-surface;
|
|
|
|
version = "6.6.13";
|
|
kernelPatches = surfacePatches {
|
|
inherit version;
|
|
patchFn = ./patches.nix;
|
|
};
|
|
kernelPackages = linuxPackage {
|
|
inherit version kernelPatches;
|
|
sha256 = "sha256-iLiefdQerU46seQRyLuNWSV1rPgVzx3zwNxX4uiCwLw=";
|
|
ignoreConfigErrors=true;
|
|
};
|
|
|
|
in {
|
|
options.microsoft-surface.kernelVersion = mkOption {
|
|
type = versionsOfOption version;
|
|
};
|
|
|
|
config = mkIf (isVersionOf cfg.kernelVersion version) {
|
|
boot = {
|
|
inherit kernelPackages;
|
|
};
|
|
};
|
|
}
|