about summary refs log tree commit diff
path: root/nixos/modules/system/boot
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@sap.com>2022-10-26 16:51:29 +0200
committerSandro Jäckel <sandro.jaeckel@gmail.com>2022-11-09 23:45:33 +0100
commit182575a60d7e897b62a837fdd8047ae4fe44b4c6 (patch)
treeb94f1e2623e17a3193aa638776ad7afdfdc829b5 /nixos/modules/system/boot
parent8191089900837e16cf53348a5c66d45306986474 (diff)
nixos/kernel: replace boot.isContainer with boot.kernel.enable
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r--nixos/modules/system/boot/kernel.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix
index 8a1630f7e3ebb..6783f8ec62ff9 100644
--- a/nixos/modules/system/boot/kernel.nix
+++ b/nixos/modules/system/boot/kernel.nix
@@ -20,6 +20,9 @@ in
   ###### interface
 
   options = {
+    boot.kernel.enable = mkEnableOption (lib.mdDoc "the Linux kernel. This is useful for systemd-like containers which do not require a kernel.") // {
+      default = true;
+    };
 
     boot.kernel.features = mkOption {
       default = {};
@@ -258,7 +261,7 @@ in
           ];
       })
 
-      (mkIf (!config.boot.isContainer) {
+      (mkIf config.boot.kernel.enable {
         system.build = { inherit kernel; };
 
         system.modulesTree = [ kernel ] ++ config.boot.extraModulePackages;