···77 ###### interface
8899 options = {
1010+ boot.modprobeConfig.enable = mkEnableOption (lib.mdDoc "modprobe config. This is useful for systemds like containers which do not require a kernel.") // {
1111+ default = true;
1212+ };
10131114 boot.blacklistedKernelModules = mkOption {
1215 type = types.listOf types.str;
···38413942 ###### implementation
40434141- config = mkIf (!config.boot.isContainer) {
4444+ config = mkIf config.boot.modprobeConfig.enable {
42454346 environment.etc."modprobe.d/ubuntu.conf".source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf";
4447
+2
nixos/modules/virtualisation/container-config.nix
···8899 # Disable some features that are not useful in a container.
10101111+ # containers don't have a kernel
1112 boot.kernel.enable = false;
1313+ boot.modprobeConfig.enable = false;
12141315 console.enable = mkDefault false;
1416