2022-11-28 10:26:47 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2021-01-23 07:36:37 +01:00
|
|
|
|
2022-11-28 08:23:51 +01:00
|
|
|
# To test the kernel build:
|
2022-11-28 08:28:52 +01:00
|
|
|
# nix-build -E "with import <nixpkgs> {}; (pkgs.callPackage ./. {}).boot.kernelPackages.kernel"
|
2022-11-28 08:23:51 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) kernel recurseIntoAttrs;
|
2022-11-28 10:26:47 +01:00
|
|
|
inherit (pkgs) buildLinux linuxPackagesFor;
|
|
|
|
repos = pkgs.callPackage ../repos.nix {};
|
2022-11-28 08:23:51 +01:00
|
|
|
|
|
|
|
linuxPackage =
|
|
|
|
{ version,
|
|
|
|
modDirVersion ? version,
|
|
|
|
branch,
|
|
|
|
src,
|
|
|
|
kernelPatches ? [],
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
buildLinux' = buildLinux {
|
|
|
|
inherit version src kernelPatches;
|
|
|
|
modDirVersion = version;
|
|
|
|
extraMeta.branch = branch;
|
|
|
|
};
|
2022-11-28 10:26:47 +01:00
|
|
|
linuxPackagesFor' = linuxPackagesFor buildLinux';
|
2022-11-28 08:23:51 +01:00
|
|
|
in recurseIntoAttrs linuxPackagesFor';
|
|
|
|
|
2022-12-05 00:13:34 +01:00
|
|
|
linux-5_19_17 = linuxPackage (
|
|
|
|
pkgs.callPackage ./linux-5.19.17.nix { inherit repos; }
|
2022-11-28 08:23:51 +01:00
|
|
|
);
|
|
|
|
|
2022-12-05 01:41:07 +01:00
|
|
|
linux-6_0_11 = linuxPackage (
|
|
|
|
pkgs.callPackage ./linux-6.0.11.nix { inherit repos; }
|
|
|
|
);
|
|
|
|
|
2022-11-28 08:23:51 +01:00
|
|
|
in {
|
2022-12-05 01:41:07 +01:00
|
|
|
boot.kernelPackages = linux-6_0_11;
|
2021-01-23 07:36:37 +01:00
|
|
|
}
|