at 23.05-pre 68 lines 1.9 kB view raw
1{ lib, stdenv, fetchFromGitHub, buildLinux, ... } @ args: 2 3let 4 # These names are how they are designated in https://xanmod.org. 5 ltsVariant = { 6 version = "5.15.75"; 7 hash = "sha256-tgm5nmguEfRFq3OhmZgRgFLIW7E798Rv1basxnfdqLI="; 8 variant = "lts"; 9 }; 10 11 mainVariant = { 12 version = "6.0.7"; 13 hash = "sha256-qeM2oswuop42rvyBGlrH6VvODScLCpAOjTc4KR5a2Ec="; 14 variant = "main"; 15 }; 16 17 xanmodKernelFor = { version, suffix ? "xanmod1", hash, variant }: buildLinux (args // rec { 18 inherit version; 19 modDirVersion = "${version}-${suffix}"; 20 21 src = fetchFromGitHub { 22 owner = "xanmod"; 23 repo = "linux"; 24 rev = modDirVersion; 25 inherit hash; 26 }; 27 28 structuredExtraConfig = with lib.kernel; { 29 # AMD P-state driver 30 X86_AMD_PSTATE = lib.mkOverride 60 yes; 31 32 # Google's BBRv2 TCP congestion Control 33 TCP_CONG_BBR2 = yes; 34 DEFAULT_BBR2 = yes; 35 36 # Google's Multigenerational LRU framework 37 LRU_GEN = yes; 38 LRU_GEN_ENABLED = yes; 39 40 # FQ-PIE Packet Scheduling 41 NET_SCH_DEFAULT = yes; 42 DEFAULT_FQ_PIE = yes; 43 44 # Futex WAIT_MULTIPLE implementation for Wine / Proton Fsync. 45 FUTEX = yes; 46 FUTEX_PI = yes; 47 48 # WineSync driver for fast kernel-backed Wine 49 WINESYNC = module; 50 51 # Preemptive Full Tickless Kernel at 500Hz 52 HZ = freeform "500"; 53 HZ_500 = yes; 54 HZ_1000 = no; 55 }; 56 57 extraMeta = { 58 branch = lib.versions.majorMinor version; 59 maintainers = with lib.maintainers; [ fortuneteller2k lovesegfault atemu ]; 60 description = "Built with custom settings and new features built to provide a stable, responsive and smooth desktop experience"; 61 broken = stdenv.isAarch64; 62 }; 63 } // (args.argsOverride or { })); 64in 65{ 66 lts = xanmodKernelFor ltsVariant; 67 main = xanmodKernelFor mainVariant; 68}