about summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@sap.com>2022-10-26 17:05:14 +0200
committerSandro Jäckel <sandro.jaeckel@sap.com>2022-11-24 14:07:46 +0100
commitf4d8e64bed05489cdb2af880644f1da4d0fe4eef (patch)
tree814fe65a73b2a577c148e8d2d4b92cd7e6048b81 /nixos/modules/system
parent7abad9f4b7020001257133cbf65bbcc4af0c3192 (diff)
nixos/modprobe: replace boot.isContainer with boot.modprobeConfig.enable
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/modprobe.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix
index c8ab3b0d8e4af..54bb7ea9ddd76 100644
--- a/nixos/modules/system/boot/modprobe.nix
+++ b/nixos/modules/system/boot/modprobe.nix
@@ -7,6 +7,9 @@ with lib;
   ###### interface
 
   options = {
+    boot.modprobeConfig.enable = mkEnableOption (lib.mdDoc "modprobe config. This is useful for systemds like containers which do not require a kernel.") // {
+      default = true;
+    };
 
     boot.blacklistedKernelModules = mkOption {
       type = types.listOf types.str;
@@ -38,7 +41,7 @@ with lib;
 
   ###### implementation
 
-  config = mkIf (!config.boot.isContainer) {
+  config = mkIf config.boot.modprobeConfig.enable {
 
     environment.etc."modprobe.d/ubuntu.conf".source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf";