diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix index a1feaad6132..a3b616ff3ef 100644 --- a/nixos/modules/system/boot/modprobe.nix +++ b/nixos/modules/system/boot/modprobe.nix @@ -101,7 +101,7 @@ with lib; echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe ''; - environment.variables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules"; + environment.sessionVariables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules"; };