Packaging CachyOS in Nixpkgs

Since Chaotic’s Nyx has been archived the 2025-12-08 ;

GitHub - xddxdd/nix-cachyos-kernel: CachyOS kernel for NixOS has become the main way to use the CachyOS Linux kernel on NixOS

Given than the Linux Zen kernel and XanMod Linux kernel are already packaged in nixpkgs, I think the CachyOS Linux kernel deserves to be first-class packaged as well

Google Trends - Linux Zen (Search term) VS XanMod (Search term) VS CachyOS (Search term) - Worldwide - From 2024-01-01 To 2026-02-21 - Web Search

References

6 Likes

I think the main reason it’s not currently is that it moves ridiculously quickly for a kernel fork. Keeping up with it from a maintenance perspective is quite difficult.

1 Like

We had this discussion already many times. For starters, Nixpkgs doesn’t have the capability to build every custom kernels that might interest its users, Zen and Xan are already exceptions, and it’s wrong to keep adding more exceptions. Second, each kernel introduces ~300 closures due to all the variations of kernel modules derivations built with linuxPackagesFor, these derivations already take more time to build than the kernel itself, imagine how this will grow with more custom kernels and more modules. Third, the quality of in-Nixpkgs custom kernels are not the same as third party repos published for other distros, if you compare /proc/config.gz from our xanmod vs Ubuntu’s xanmod you’ll see thousands of different lines, we should build them with linuxManualConfig but instead we manually maintain the CONFIG_* and that we’ll never be fully in sync.

My vote will always be to drop Xan and Zen from Nixpkgs, maybe move them to nix-community with linuxManualConfig instead. There we could later add Cachyos’, but that’s harder because beside the kconfig’s dotconfig they manipulate it inside the PKGBUILD creating many variations of it…

PS: There are other wars to be fought as well, like Cachyos builds with clang+ThinLTO, and many of our kernel modules aren’t ready for that; linuxManualConfig doesn’t support our extraKernel{Patches,Config}; and many Cachyos users will want kernel built against their microarch (or at least x86-64-v3).

8 Likes

Functionally, what in the packaging of those kernel modules would be enabled in nix-community which would be infisible in nixpkgs?

This was already explained above… lack of committer interest and burden on hydra. Random meme kernels don’t belong in nixpkgs.

2 Likes