Arch and Fedora have been shipping it for a while now, we should
probably join them in the happy non-fbdev future. Legacy fbdev
drivers are still enabled for now, so non-simpledrm-friendly
devices don't break.
Previously, when a kernel configuration option was defined multiple times (in
different sections), only the first value was honored and all subsequent ones
were silently ignored. Remove this footgun by throwing in this situation
instead.
In addition, fix all instances where an option was in fact defined multiple
times. In two cases (`RCU_TORTURE_TEST` and `CRASH_DUMP`), the value was
effectively the same both times. In the other two cases (`SCHEDSTATS` and
`DRM_SIMPLEDRM`) the value was in fact different; the one that was actually
applied was kept here to prevent a rebuild.
This is just useful things I've found while diffing our kernel configs
with Arch and Fedora. Some of these have a small performance overhead,
most are completely free.
Switch default performance governor to schedutil, because performance
is almost always a bad default.
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
As per https://docs.kernel.org/sound/designs/powersave.html
We update our defaults for better power saving on laptops
which does not perform powertop --auto-tune, TLP or manual tweaking, e.g.
power-profiles-daemon.
Currently things like `buildLinux { inherit src version; }` fail because of
`callPackage` auto-inserting `kernelPatches`, which is both a `buildLinux`
argument and a `pkgs` toplevel attribute, with completely different semantics.
Avoid that entirely by splitting the call into two - one for arguments we want
from `callPackage`, and one for everything else.