2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, buildLinux, ... } @ args:
|
|
|
|
|
|
|
|
let
|
2022-08-21 13:32:41 +00:00
|
|
|
# These names are how they are designated in https://xanmod.org.
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
# NOTE: When updating these, please also take a look at the changes done to
|
|
|
|
# kernel config in the xanmod version commit
|
2022-08-12 12:06:08 +00:00
|
|
|
ltsVariant = {
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "6.1.69";
|
|
|
|
hash = "sha256-/uk2sS7g4REPtR/LSc7djjoc//m6QvrXfHO4OemQcy8=";
|
2022-08-21 13:32:41 +00:00
|
|
|
variant = "lts";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
mainVariant = {
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "6.6.8";
|
|
|
|
hash = "sha256-TtWTYuT3GMnQy1shkF+HTgv4Z1OSOLh4RXfG+Xj0n3M=";
|
2022-11-02 22:02:43 +00:00
|
|
|
variant = "main";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
xanmodKernelFor = { version, suffix ? "xanmod1", hash, variant }: buildLinux (args // rec {
|
2022-04-27 09:35:20 +00:00
|
|
|
inherit version;
|
2022-12-28 21:21:41 +00:00
|
|
|
modDirVersion = lib.versions.pad 3 "${version}-${suffix}";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xanmod";
|
|
|
|
repo = "linux";
|
|
|
|
rev = modDirVersion;
|
|
|
|
inherit hash;
|
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
structuredExtraConfig = with lib.kernel; {
|
2023-08-22 20:05:09 +00:00
|
|
|
# Google's BBRv3 TCP congestion Control
|
|
|
|
TCP_CONG_BBR = yes;
|
|
|
|
DEFAULT_BBR = yes;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
# WineSync driver for fast kernel-backed Wine
|
|
|
|
WINESYNC = module;
|
2022-11-02 22:02:43 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# Preemptive Full Tickless Kernel at 250Hz
|
|
|
|
HZ = freeform "250";
|
|
|
|
HZ_250 = yes;
|
2022-11-02 22:02:43 +00:00
|
|
|
HZ_1000 = no;
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
extraMeta = {
|
|
|
|
branch = lib.versions.majorMinor version;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with lib.maintainers; [ moni lovesegfault atemu shawn8901 zzzsy ];
|
2022-04-27 09:35:20 +00:00
|
|
|
description = "Built with custom settings and new features built to provide a stable, responsive and smooth desktop experience";
|
|
|
|
broken = stdenv.isAarch64;
|
|
|
|
};
|
|
|
|
} // (args.argsOverride or { }));
|
|
|
|
in
|
|
|
|
{
|
2022-08-12 12:06:08 +00:00
|
|
|
lts = xanmodKernelFor ltsVariant;
|
2022-11-02 22:02:43 +00:00
|
|
|
main = xanmodKernelFor mainVariant;
|
2022-04-27 09:35:20 +00:00
|
|
|
}
|