diff options
Diffstat (limited to 'nixos/modules/system/boot/kernel.nix')
-rw-r--r-- | nixos/modules/system/boot/kernel.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index 0f342f44fe76..a6bbca9b30bb 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -228,6 +228,7 @@ in systemd.services."systemd-modules-load" = { wantedBy = [ "multi-user.target" ]; restartTriggers = [ kernelModulesConf ]; + environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; serviceConfig = { # Ignore failed module loads. Typically some of the # modules in ‘boot.kernelModules’ are "nice to have but @@ -237,6 +238,10 @@ in }; }; + systemd.services.kmod-static-nodes = + { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; + }; + lib.kernelConfig = { isYes = option: { assertion = config: config.isYes option; |