Change:
linuxPackages_latest-libre = recurseIntoAttrs (linuxPackagesFor linux_latest-libre); linux_latest-libre = linux-libre.override { linux = linux_latest; }; <ins> # zen-kernel linuxPackages_zen = recurseIntoAttrs (linuxPackagesFor pkgs.linux_zen); </ins> # A function to build a manually-configured kernel linuxManualConfig = makeOverridable (callPackage ../os-specific/linux/kernel/manual-config.nix {});

Discussion:
In this came the question up, why the Zen-kernel was removed from NixOS. It was in 2009 by but now it's not there anymore. I don't see when it was removed in the history. The project is actively developed (latest commit 3 days ago) and having a kernel optimised for desktop use seems a nice idea. Project desription is currently found here: a distro kernel replacement built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads. Since packaging an additional kernel is actually quiet easy in NixOS, i might try it, but i will not be able to update it frequently. So an additional maintainer would be good.
It updates out of sync with the main kernel, and I guess 2012 could be when I either stopped needing TuxOnIce because in-kernel suspend-to-disk became good enough, or started using BtrFS and wanting to have the latest release as soon as it appears, or both. Someone needs to update the version and prune the old ones, and noone cared at the time.
Oh, it’s my Reddit post. I would be happy to help update the kernel
great. sadly i will not find time soon to look into it. I have packaged a kernel that provides a new filesystem (bcachefs): I would take that as an example and change what's needed.
I would hope that for packaging a new kernel, the main effort is building/testing, indeed — the bcachefs example confirms this (it just passes another source, additional config and some meta like resetting maintainers) If you get around to try doing this, feel free to ping me for Nix-level review/merge once you have test the kernel and find it working fine.
I was running the zen kernel patches as my system for a while; I have moved away from nix due to compatibility issues and difficulty patching some applications such as cryptomator, Zotero and some proprietary software. That being said any testing, I would now be superficial. I am still open to helping and testing, but as this is no longer my primary distro, I don’t believe I can test this enough for initial support at this time.

Now I wonder where we should have the description for the FHS env escape-hatch functionality so that people like you (before giving up) can find it easily… (NixOS Wiki FAQ describes it in the «I've downloaded a binary» question).
I asked around for it, cryptomator is shipped as an appimage and because it needed fuse, it wasn't playing nicely. My next attempt was to build it from source, which proved to be a nightmare attempting to declare all of the maven sources. Anyways, a discussion for another issue, I did attempt patchelf though
I was running the zen kernel patches as my system for a while what was your experience with it? did you get a significant performance improvement, for example in games? is it worth the effort?
I was running the zen kernel patches as my system for a while ... I do notice some gains while playing games, ~10fps on some and on others nothing. I’m unsure if this is from fsync or fsync and the other patches though.
I've noticed a significant improvement in responsiveness overall. That's hard to see on a performance test, but Linux always felt laggy to me in a way that Windows doesn't... I was able to do a blind test to confirm that the Zen kernel at least improves on that, IMO significantly. (It's not double blind when the other party is a computer, right?) For the time being, I'm using this to run it:
blind means you implemented booting a random configuration? If you keep track of their latest releases anyway, maybe add a hash and list it in the NUR?
Yes. Nix is supposed to be purely functional, but there's nothing stopping me from doing . (Except I'm not sure if that function is lazy. In actual fact I wrote a small script to select one at random before calling nixos-rebuild.) Are strings lazy? Anyway... there's no doubt in my mind that zen-kernel has a better default configuration. I'm not so sure that it's not just better defaults, though. I want to look at that before uploading anything; if we're lucky, I might be able to get the same effect by tweaking vanilla kernel parameters instead. It'll take at least a week to get enough samples to be sure of that, more likely multiple, so don't hold your breath.

Meanwhile, well, there is the above, and I'll update this thread with vanilla configuration(s) once I find a decent one.
Yes. Nix is supposed to be purely functional, but there's nothing stopping me from doing . (Except I'm not sure if that function is lazy. In actual fact I wrote a small script to select one at random before calling nixos-rebuild.) Hm, I expected building both then swtitch-to-configuration boot Anyway... there's no doubt in my mind that zen-kernel has a better default configuration. I'm not so sure that it's not just better defaults, though. I want to look at that before uploading anything; if we're lucky, I might be able to get the same effect by tweaking vanilla kernel parameters instead. But they still seem to carry BFS/MuQSS, for example. I don't think this is something you can just enable inthe mainline.
At the very least, it carries the futex-wait-multiple patchset which is not found in any pre-built NixOS kernel to my knowledge. I went ahead and packaged it for Nixpkgs in , feel free to test.