mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-08 20:19:40 +01:00
30 lines
654 B
Nix
30 lines
654 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
inherit (lib) mkIf mkOption types;
|
|
|
|
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage2 surfacePatches;
|
|
|
|
cfg = config.microsoft-surface;
|
|
|
|
version = "6.6.10";
|
|
kernelPatches = surfacePatches {
|
|
inherit version;
|
|
patchFn = ./patches.nix;
|
|
};
|
|
kernelPackages = linuxPackage2 {
|
|
inherit version kernelPatches;
|
|
sha256 = "sha256-nuYn5MEJrsf8o+2liY6B0gGvLH6y99nX2UwfDhIFVGw=";
|
|
};
|
|
|
|
in {
|
|
options.microsoft-surface.kernelVersion = mkOption {
|
|
type = types.enum [ version ];
|
|
};
|
|
|
|
config = mkIf (cfg.kernelVersion == version) {
|
|
boot = {
|
|
inherit kernelPackages;
|
|
};
|
|
};
|
|
}
|