Integrating the linux-g14 Kernel into NixOS Kernels? (Broader ASUS Laptop Support?)

Hello NixOS Community,

I’ve been following the development of the linux-g14 kernel for some time now, and I’m quite impressed with the level of hardware support and specific features it brings to ASUS laptops.

For those unfamiliar, the repository can be found here (latest kernel branch): https://gitlab.com/dragonn/linux-g14/-/tree/6.14?ref_type=heads (currently on the 6.14 branch).

While the name might suggest it’s solely focused on the G14, this kernel includes patches and drivers that address common hardware and functionality issues found across various ASUS laptop models. This often translates to better power management, fan control, keyboard backlight control, and other crucial functionalities that can be less than ideal with the mainline kernel on these devices.

Given the number of NixOS users who own ASUS laptops, I was wondering if there has been any consideration or if there could be an effort to integrate the relevant patches and potentially build a dedicated linux-asus (or similar) kernel package within Nixpkgs, drawing from the work done in the linux-g14 project.

Some potential benefits of this could include:

  • Improved out-of-the-box experience for a wider range of ASUS users: Many ASUS laptop owners could benefit from these improvements without needing to manually patch or configure their kernels.
  • Easier maintenance and updates: A dedicated package within Nixpkgs would benefit from the infrastructure for updates and security patches.
  • Community support: Having a specific kernel target (or set of patches) could foster better community support and knowledge sharing for ASUS devices within the NixOS ecosystem.
  • Leveraging existing work: The linux-g14 project provides a valuable foundation of patches and configurations that could be adapted for broader ASUS support.

Of course, I understand that maintaining additional kernel packages comes with its own set of challenges regarding build infrastructure, testing across different models, and ongoing maintenance.

I’d love to hear the community’s thoughts on this. Are there others with various ASUS laptops who might find this beneficial? Has the broader ASUS laptop compatibility of these patches been explored? Are there individuals within the community who might be interested in contributing to such an effort?

I know that some already do compile it locally with definitions in their own flakes. My hope is that this becomes a part of nixpkgs so we don’t have to compile this locally.

Thanks for your time and input!
caniko

Nixpkgs doesn’t accept vendor kernels which I assume this would count as, but I don’t see why this can’t go to nixos-hardware

Also, I recommend getting acquainted with nixos-facter.

Yeah, I thought about this too. Nice.