nichts/hosts/temperance/kernel/xanmod.nix

65 lines
1.5 KiB
Nix
Raw Normal View History

2024-10-22 23:50:10 +02:00
{
lib,
stdenv,
fetchFromGitHub,
buildLinux,
2024-10-23 00:07:16 +02:00
kernelPatches,
2024-10-22 23:50:10 +02:00
...
}: let
2024-10-23 00:07:16 +02:00
pname = "linux-xanmod";
2024-10-23 00:45:35 +02:00
version = "6.11.5";
2024-10-23 00:07:16 +02:00
vendorSuffix = "xanmod1";
modDirVersion = lib.versions.pad 3 "${version}-xanmod1";
2024-10-22 23:50:10 +02:00
2024-10-23 00:45:35 +02:00
inherit (lib.modules) mkForce;
inherit (lib.kernel) freeform yes no;
2024-10-23 00:07:16 +02:00
xanmod_blox = buildLinux {
inherit pname version modDirVersion;
2024-10-22 23:50:10 +02:00
src = fetchFromGitHub {
owner = "xanmod";
repo = "linux";
2024-10-23 00:07:16 +02:00
rev = "refs/tags/${version}-${vendorSuffix}";
2024-10-23 00:45:35 +02:00
hash = "sha256-G4u0LQtIeJ0dNAmjNH0OKihmbkivYVbrbXDB9vPw2xI=";
2024-10-22 23:50:10 +02:00
};
2024-10-23 00:07:16 +02:00
2024-10-22 23:50:10 +02:00
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
];
enableCommonConfig = true;
# Default Xanmod options
2024-10-23 00:45:35 +02:00
structuredExtraConfig = {
2024-10-22 23:50:10 +02:00
# CPUFreq governor Performance
2024-10-23 00:45:35 +02:00
CPU_FREQ_DEFAULT_GOV_PERFORMANCE = mkForce 60 yes;
CPU_FREQ_DEFAULT_GOV_SCHEDUTIL = mkForce 60 no;
2024-10-22 23:50:10 +02:00
# Full preemption
2024-10-23 00:45:35 +02:00
PREEMPT = mkForce 60 yes;
PREEMPT_VOLUNTARY = mkForce 60 no;
2024-10-22 23:50:10 +02:00
# Google's BBRv3 TCP congestion Control
TCP_CONG_BBR = yes;
DEFAULT_BBR = yes;
# Preemptive Full Tickless Kernel at 250Hz
HZ = freeform "250";
HZ_250 = yes;
HZ_1000 = no;
# RCU_BOOST and RCU_EXP_KTHREAD
RCU_EXPERT = yes;
RCU_FANOUT = freeform "64";
RCU_FANOUT_LEAF = freeform "16";
RCU_BOOST = yes;
RCU_BOOST_DELAY = freeform "0";
RCU_EXP_KTHREAD = yes;
};
};
2024-10-23 00:07:16 +02:00
in {
inherit
xanmod_blox
;
}