diff options
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/boot/modprobe.nix | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix index 7b214cd1e1f54..652eb046f50a7 100644 --- a/nixos/modules/system/boot/modprobe.nix +++ b/nixos/modules/system/boot/modprobe.nix @@ -68,20 +68,15 @@ with lib; config = mkIf (!config.boot.isContainer) { - environment.etc = [ - { source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf"; - target = "modprobe.d/ubuntu.conf"; - } - { source = pkgs.writeText "modprobe.conf" - '' - ${flip concatMapStrings config.boot.blacklistedKernelModules (name: '' - blacklist ${name} - '')} - ${config.boot.extraModprobeConfig} - ''; - target = "modprobe.d/nixos.conf"; - } - ]; + environment.etc."modprobe.d/ubuntu.conf".source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf"; + + environment.etc."modprobe.d/nixos.conf".text = + '' + ${flip concatMapStrings config.boot.blacklistedKernelModules (name: '' + blacklist ${name} + '')} + ${config.boot.extraModprobeConfig} + ''; environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ]; |