Hacker News new | ask | show | jobs
by subway 2652 days ago
If you operate from the mindset that nix is always responsible for all of the kernel and all of userland, none are unreasonable.

The moment you try to live in a world where nix isn't controlling the kernel, most of those packages are unreasonable. Several provide both a kernel module and userspace tools. Wireguard, VirtualBox, OpenAFS are prime examples that jump out at me. It's totally reasonable to wish to install the userland portion of any of these packages without adding a kernel you cant even use to your system image.

My personal preference would be to see such packages split, with the kernel module package treated as an optional dependency for the userland package. Then the kmod can drag in the kernel and headers only when needed.

1 comments

Fortunately, the userland functionalities of those examples are packaged separately, I checked just to be sure:

wireguard: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/netw...

virtualbox: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applicatio...

openafs: https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/op...

Of course, this is not well documented so I understand that someone who isn't knowledgeable about NixOS would presume like the author that they had to depend on a Linux kernel to get these userland packages. Even I can't say with 100% confidence that everything packaged up under linuxPackages has a kernel agnostic version derivation for its userland components.

I remember being very skeptical of NixOS when I first started using it and it seemed like it was trying its best to prove me right. It really was my dislike for Ubuntu that motivated me to go all the way.