···89 options = {
1011- system.sbin.modprobe = mkOption {
12- internal = true;
13- default = pkgs.stdenv.mkDerivation {
14- name = "modprobe";
15- buildCommand = ''
16- mkdir -p $out/bin
17- for i in ${pkgs.kmod}/sbin/*; do
18- name=$(basename $i)
19- echo "$text" > $out/bin/$name
20- echo 'exec '$i' "$@"' >> $out/bin/$name
21- chmod +x $out/bin/$name
22- done
23- ln -s bin $out/sbin
24- '';
25- text =
26- ''
27- #! ${pkgs.stdenv.shell}
28- export MODULE_DIR=/run/current-system/kernel-modules/lib/modules
29-30- # Fall back to the kernel modules used at boot time if the
31- # modules in the current configuration don't match the
32- # running kernel.
33- if [ ! -d "$MODULE_DIR/$(${pkgs.coreutils}/bin/uname -r)" ]; then
34- MODULE_DIR=/run/booted-system/kernel-modules/lib/modules/
35- fi
36-37- '';
38- meta.priority = 4;
39- };
40- description = ''
41- Wrapper around modprobe that sets the path to the modules
42- tree.
43- '';
44- };
45-46 boot.blacklistedKernelModules = mkOption {
47 type = types.listOf types.str;
48 default = [];
···87 '';
88 environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases;
8990- environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ];
9192 system.activationScripts.modprobe =
93 ''
···95 # in the right location in the Nix store for kernel modules).
96 # We need this when the kernel (or some module) auto-loads a
97 # module.
98- echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe
99 '';
100101 environment.sessionVariables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
···89 options = {
100000000000000000000000000000000000011 boot.blacklistedKernelModules = mkOption {
12 type = types.listOf types.str;
13 default = [];
···52 '';
53 environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases;
5455+ environment.systemPackages = [ pkgs.kmod ];
5657 system.activationScripts.modprobe =
58 ''
···60 # in the right location in the Nix store for kernel modules).
61 # We need this when the kernel (or some module) auto-loads a
62 # module.
63+ echo ${pkgs.kmod}/bin/modprobe > /proc/sys/kernel/modprobe
64 '';
6566 environment.sessionVariables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";