nixos/udev: don't create modprobe config if modprobe is disabled
This commit is contained in:
parent
9b1984ce36
commit
413f779bc0
@ -401,17 +401,19 @@ in
|
||||
}))
|
||||
];
|
||||
|
||||
environment.etc =
|
||||
{
|
||||
"udev/rules.d".source = udevRulesFor {
|
||||
name = "udev-rules";
|
||||
udevPackages = cfg.packages;
|
||||
systemd = config.systemd.package;
|
||||
binPackages = cfg.packages;
|
||||
inherit udevPath udev;
|
||||
};
|
||||
"udev/hwdb.bin".source = hwdbBin;
|
||||
environment.etc = {
|
||||
"udev/rules.d".source = udevRulesFor {
|
||||
name = "udev-rules";
|
||||
udevPackages = cfg.packages;
|
||||
systemd = config.systemd.package;
|
||||
binPackages = cfg.packages;
|
||||
inherit udevPath udev;
|
||||
};
|
||||
"udev/hwdb.bin".source = hwdbBin;
|
||||
} // lib.optionalAttrs config.boot.modprobeConfig.enable {
|
||||
# We don't place this into `extraModprobeConfig` so that stage-1 ramdisk doesn't bloat.
|
||||
"modprobe.d/firmware.conf".text = "options firmware_class path=${config.hardware.firmware}/lib/firmware";
|
||||
};
|
||||
|
||||
system.requiredKernelConfig = with config.lib.kernelConfig; [
|
||||
(isEnabled "UNIX")
|
||||
@ -419,8 +421,6 @@ in
|
||||
(isYes "NET")
|
||||
];
|
||||
|
||||
# We don't place this into `extraModprobeConfig` so that stage-1 ramdisk doesn't bloat.
|
||||
environment.etc."modprobe.d/firmware.conf".text = "options firmware_class path=${config.hardware.firmware}/lib/firmware";
|
||||
|
||||
system.activationScripts.udevd =
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user