From 4f1dc4bfb7b5c7a6d5e77d331bc1a349e76d5808 Mon Sep 17 00:00:00 2001 From: Harold Date: Wed, 21 Feb 2024 01:10:32 +0000 Subject: [PATCH] nixos/modprobe: Added `boot.modprobeConfig.useUbuntuModuleBlacklist`. Allowing disable of the Ubuntu blacklist. --- nixos/modules/system/boot/modprobe.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix index d751c4462d3f..5738c39d15ff 100644 --- a/nixos/modules/system/boot/modprobe.nix +++ b/nixos/modules/system/boot/modprobe.nix @@ -11,6 +11,10 @@ with lib; default = true; }; + boot.modprobeConfig.useUbuntuModuleBlacklist = mkEnableOption (lib.mdDoc "Ubuntu distro's module blacklist") // { + default = true; + }; + boot.blacklistedKernelModules = mkOption { type = types.listOf types.str; default = []; @@ -43,7 +47,9 @@ with lib; config = mkIf config.boot.modprobeConfig.enable { - environment.etc."modprobe.d/ubuntu.conf".source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf"; + environment.etc."modprobe.d/ubuntu.conf" = mkIf config.boot.modprobeConfig.useUbuntuModuleBlacklist { + source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf"; + }; environment.etc."modprobe.d/nixos.conf".text = ''