Skip to content

Commit cd519af

Browse files
authored
Added boot.modprobeConfig.useUbuntuModuleBlacklist. (#290330)
2 parents 3b082a5 + 898a502 commit cd519af

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

nixos/modules/system/boot/modprobe.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ with lib;
1111
default = true;
1212
};
1313

14+
boot.modprobeConfig.useUbuntuModuleBlacklist = mkEnableOption "Ubuntu distro's module blacklist" // {
15+
default = true;
16+
};
17+
1418
boot.blacklistedKernelModules = mkOption {
1519
type = types.listOf types.str;
1620
default = [];
@@ -43,7 +47,9 @@ with lib;
4347

4448
config = mkIf config.boot.modprobeConfig.enable {
4549

46-
environment.etc."modprobe.d/ubuntu.conf".source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf";
50+
environment.etc."modprobe.d/ubuntu.conf" = mkIf config.boot.modprobeConfig.useUbuntuModuleBlacklist {
51+
source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf";
52+
};
4753

4854
environment.etc."modprobe.d/nixos.conf".text =
4955
''

0 commit comments

Comments
 (0)