grimm-nixos-laptop/kernel.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

{ config, pkgs, fetchpatch, ... }:
{
boot.kernelPackages = let
# nixpkgs.localSystem = {
# gcc.arch = "icelake-client";
# gcc.tune = "icelake-client";
# system = "x86_64-linux";
# };
linux_custom_pkg = { fetchurl, buildLinux, ... } @ args:
buildLinux (args // rec {
version = "6.6.4-clearlinux";
modDirVersion = "6.6.4";
allowImportFromDerivation = true;
# src = fetchurl {
# url = "mirror://kernel/linux/kernel/v6.x/linux-6.6.4.tar.xz";
# sha256 = "SeSWYMk9jW1Y8Rg2DTyoExaV7DRmkmPKjwQch22pPkU=";
# };
src = pkgs.fetchFromGitHub {
owner="clearlinux-pkgs";
repo="linux";
rev="6.6.4-1389";
hash="sha256-hCdhE9nqby86k4u8g8zBiMy5R7v/YeVlKMSs871d6Ak=";
};
extraMakeFlags = [
"-j 10"
"-l"
# "CXXFLAGS='-O3' CFLAGS='-O3' KCFLAGS='-O3' KCPPFLAGS='-O3'"
];
kernelPatches = [
# pkgs.kernelPatches.bridge_stp_helper
# pkgs.kernelPatches.modinst_arg_list_too_long
];
extraConfig = ''
'';
} // (args.argsOverride or {}));
linux_custom = pkgs.callPackage linux_custom_pkg{};
in
pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_custom);
}