mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-12-25 02:59:45 +01:00
249a94e715
- linux-surface: arch-6.6.4-1 -> arch-6.6.6-1
39 lines
957 B
Nix
39 lines
957 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
inherit (lib) mkIf mkOption types;
|
|
inherit (pkgs) fetchurl;
|
|
|
|
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage repos;
|
|
|
|
cfg = config.microsoft-surface;
|
|
|
|
version = "6.6.8";
|
|
majorVersion = "6.6";
|
|
patchDir = repos.linux-surface + "/patches/${majorVersion}";
|
|
kernelPatches = pkgs.callPackage ./patches.nix {
|
|
inherit (lib) kernel;
|
|
inherit version patchDir;
|
|
};
|
|
|
|
kernelPackages = linuxPackage {
|
|
inherit version kernelPatches;
|
|
extraMeta.branch = majorVersion;
|
|
src = fetchurl {
|
|
url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz";
|
|
sha256 = "sha256-UDbENOEeSzbY2j9ImFH3+CnPeF+n94h0aFN6nqRXJBY=";
|
|
};
|
|
};
|
|
|
|
|
|
in {
|
|
options.microsoft-surface.kernelVersion = mkOption {
|
|
type = types.enum [ version ];
|
|
};
|
|
|
|
config = mkIf (cfg.kernelVersion == version || cfg.kernelVersion == majorVersion) {
|
|
boot = {
|
|
inherit kernelPackages;
|
|
};
|
|
};
|
|
}
|