mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-06 01:48:50 +08:00
Fix-ups
This commit is contained in:
@@ -1,5 +1,36 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.kernelPackages = pkgs.callPackage ./linux-5.16.11.nix { };
|
||||
# To test the kernel build:
|
||||
# nix-build -E "with import <nixpkgs> {}; (pkgs.callPackage ./. {}).boot.kernelPackages.kernel"
|
||||
|
||||
let
|
||||
inherit (lib) kernel recurseIntoAttrs;
|
||||
inherit (pkgs) buildLinux linuxPackagesFor;
|
||||
repos = pkgs.callPackage ../repos.nix {};
|
||||
|
||||
linuxPackage =
|
||||
{ version,
|
||||
modDirVersion ? version,
|
||||
branch,
|
||||
src,
|
||||
kernelPatches ? [],
|
||||
...
|
||||
}: let
|
||||
buildLinux' = buildLinux {
|
||||
inherit version src kernelPatches;
|
||||
modDirVersion = version;
|
||||
extraMeta.branch = branch;
|
||||
};
|
||||
linuxPackagesFor' = linuxPackagesFor buildLinux';
|
||||
in recurseIntoAttrs linuxPackagesFor';
|
||||
|
||||
linux-5_16_11 = linuxPackage (
|
||||
pkgs.callPackage ./linux-5.16.11.nix { inherit repos; }
|
||||
);
|
||||
linux-5_19_2 = linuxPackage (
|
||||
pkgs.callPackage ./linux-5.19.2.nix { inherit repos; }
|
||||
);
|
||||
|
||||
in {
|
||||
boot.kernelPackages = linux-5_19_2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user