nixos-hardware/microsoft/surface/common/kernel/linux-6.6.x/default.nix
Stig Palmquist fef05bf9c8 surface: linux 6.5.11 -> 6.6.6
- linux-surface: arch-6.6.1-1 -> arch-6.6.4-1
- update config for 6.6
2023-12-11 23:13:10 +00:00

40 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.6";
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-6/cKkXk0sTFp4b5blcO2wv6lvBTm3BRPHvuKABayJMg=";
};
};
in {
options.microsoft-surface.kernelVersion = mkOption {
type = types.enum [ version ];
};
config = mkIf (cfg.kernelVersion == version || cfg.kernelVersion == majorVersion) {
boot = {
inherit kernelPackages;
};
};
}