1{ lib, stdenv, fetchFromGitHub, buildLinux, ... } @ args:
2
3let
4 # These names are how they are designated in https://xanmod.org.
5
6 # NOTE: When updating these, please also take a look at the changes done to
7 # kernel config in the xanmod version commit
8 ltsVariant = {
9 version = "6.1.62";
10 hash = "sha256-fo5OQ/MZ+QVdCmLzX0OgFUBedfqrkqp+Ev081RVdtWw=";
11 variant = "lts";
12 };
13
14 mainVariant = {
15 version = "6.5.11";
16 hash = "sha256-1bb5LG6JvqX5eNSe2Xyu86HxaqkUVkKUf1H3T7bFkGE=";
17 variant = "main";
18 };
19
20 xanmodKernelFor = { version, suffix ? "xanmod1", hash, variant }: buildLinux (args // rec {
21 inherit version;
22 modDirVersion = lib.versions.pad 3 "${version}-${suffix}";
23
24 src = fetchFromGitHub {
25 owner = "xanmod";
26 repo = "linux";
27 rev = modDirVersion;
28 inherit hash;
29 };
30
31 structuredExtraConfig = with lib.kernel; {
32 # Google's BBRv3 TCP congestion Control
33 TCP_CONG_BBR = yes;
34 DEFAULT_BBR = yes;
35
36 # WineSync driver for fast kernel-backed Wine
37 WINESYNC = module;
38
39 # Preemptive Full Tickless Kernel at 250Hz
40 HZ = freeform "250";
41 HZ_250 = yes;
42 HZ_1000 = no;
43 };
44
45 extraMeta = {
46 branch = lib.versions.majorMinor version;
47 maintainers = with lib.maintainers; [ moni lovesegfault atemu shawn8901 zzzsy ];
48 description = "Built with custom settings and new features built to provide a stable, responsive and smooth desktop experience";
49 broken = stdenv.isAarch64;
50 };
51 } // (args.argsOverride or { }));
52in
53{
54 lts = xanmodKernelFor ltsVariant;
55 main = xanmodKernelFor mainVariant;
56}