kmod: switch the priority of module dirs

make "/run/booted-system/kernel-modules" be searched first

Fixes https://github.com/NixOS/nixpkgs/issues/146383
modprobe: ERROR: could not insert 'zram': Invalid argument
This commit is contained in:
Artturin 2021-12-07 06:20:59 +02:00
parent a78dd785b2
commit 453968c01a

View file

@ -4,7 +4,7 @@
}:
let
systems = [ "/run/current-system/kernel-modules" "/run/booted-system/kernel-modules" "" ];
systems = [ "/run/booted-system/kernel-modules" "/run/current-system/kernel-modules" "" ];
modulesDirs = lib.concatMapStringsSep ":" (x: "${x}/lib/modules") systems;
in stdenv.mkDerivation rec {