Use systemd-modules-load.service to load required kernel modules
This commit is contained in:
parent
23947c26a8
commit
52b6e10315
@ -173,6 +173,18 @@ let kernel = config.boot.kernelPackages.kernel; in
|
||||
# The Linux kernel >= 2.6.27 provides firmware.
|
||||
hardware.firmware = [ "${kernel}/lib/firmware" ];
|
||||
|
||||
# Create /etc/modules-load.d/nixos.conf, which is read by
|
||||
# systemd-modules-load.service to load required kernel modules.
|
||||
# FIXME: ensure that systemd-modules-load.service is restarted if
|
||||
# this file changes.
|
||||
environment.etc = singleton
|
||||
{ target = "modules-load.d/nixos.conf";
|
||||
source = pkgs.writeText "nixos.conf"
|
||||
''
|
||||
${concatStringsSep "\n" config.boot.kernelModules}
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -67,6 +67,9 @@ let
|
||||
"systemd-update-utmp-runlevel.service"
|
||||
"systemd-update-utmp-shutdown.service"
|
||||
|
||||
# Kernel module loading.
|
||||
"systemd-modules-load.service"
|
||||
|
||||
# Filesystems.
|
||||
"systemd-fsck@.service"
|
||||
"systemd-fsck-root.service"
|
||||
|
Loading…
Reference in New Issue
Block a user