NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.31k stars 13.54k forks source link

Meta issue about kernel configuration #69014

Open teto opened 4 years ago

teto commented 4 years ago

This issue lists steps I intend to follow to improve kernel integration into nixos. Mainly I would like nixpkgs to be able to mark kernel configuration entries as dependencies. For instance enabling bcc, should enable CONFIG_BPF or at least check that it is available. Ideally I would like to make it easier to compose/override kernel configurations as the current process is quite tricky (you gotta choose carefully between override/overrideAttrs).

Related issues: https://github.com/NixOS/nixpkgs/issues/41103 https://github.com/NixOS/nixpkgs/issues/2296 https://github.com/NixOS/nixpkgs/issues/20187

edolstra commented 4 years ago

The problem with this is that there is no way to validate the kernel feature requirements specified by modules. For example, if a module requires BPF but doesn't declare it, it will still work correctly if BPF is enabled by some other module.

teto commented 4 years ago

One of my propositions is to tie the kernel requirement to the package (via meta.requiredKernelConfiguration for instance). Several packages can't be run without the proper kernel features (openvswitch/bpf/perf/mininet/powertop...).

Regarding your comment, if you just install this specific module and it doesn't declare its (required) dependency on BPF then you are screwed (in the absence of the other module) so you better declare it :p

stale[bot] commented 4 years ago

Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on irc.freenode.net.