How to discover kernel package names?

Hi,
is there a better way to discover the pkg name for kernel packages as search.nixos.org?

Example: How to find the correct pkg name for usbip?

AsIs situation via search.nixos.org:

  • linuxPackages.usbip # working (legacy?), but not discoverable via search.nixos.org
  • linuxKernel.packages.usbip # does not exist anywhere
  • linuxKernel.packages.linux.usbip # does not exist anywhere
  • linuxKernel.packages.linux_latest.usbip # does not exist anywhere
  • linuxKernel.packages.linux_latest_libre.usbip # working and discoverable via search.nixos.org, but too specific
  • linuxKernel.packages.linux_6_14.usbip # working and discoverable via seatch.nixos.org, but too specific

So for me,

  • linuxKernel.packages.usbip
  • linuxKernel.packages.linux.usbip
  • linuxKernel.packages.linux_latest.usbip

would be the right solution - without the need to update my config with kernel version.
I can follow exactly the latest alias, but only by switching to a specific kernel flavor (libre, hardening,…).

How to discover and use kernel-mod-userland-tools for nixos without know or guess the correct names? How to sepcify kernel-mod-userland-tools without specify a specific version or flavour?

The answer is unfortunately linuxKernel.packages.linux_6_12.usbip

That’s because linuxKernel.packages.linux_default is a package alias which points to the current default kernel. Package aliases currently don’t turn up in the search, so you just need to know what the current kernel version is.

I don’t know why package aliases don’t show up on search.nixos.org.

I’d probably use none of these and use config.boot.kernelPackages.usbip instead to ensure compatibility and minimise closure size.

1 Like