summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2019-06-22 20:10:03 +0200
committerDomen Kožar <domen@dev.si>2019-06-22 20:11:11 +0200
commit224a6562a4880195afa5c184e755b8ecaba41536 (patch)
tree216e56ac04155ede06a66192fcc3b4332602cde7 /nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix
parent8b7c42032ea563d545712272cfa7d10fd9b60681 (diff)
downloadnixpkgs-224a6562a4880195afa5c184e755b8ecaba41536.tar
nixpkgs-224a6562a4880195afa5c184e755b8ecaba41536.tar.gz
nixpkgs-224a6562a4880195afa5c184e755b8ecaba41536.tar.bz2
nixpkgs-224a6562a4880195afa5c184e755b8ecaba41536.tar.lz
nixpkgs-224a6562a4880195afa5c184e755b8ecaba41536.tar.xz
nixpkgs-224a6562a4880195afa5c184e755b8ecaba41536.tar.zst
nixpkgs-224a6562a4880195afa5c184e755b8ecaba41536.zip
Add configurationLimit to systemd-boot to prevent running out of disk space
Refs #23926
Diffstat (limited to 'nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix')
-rw-r--r--nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix
index 3e39dc5dd39..910a602c61d 100644
--- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix
+++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix
@@ -22,7 +22,7 @@ let
 
     editor = if cfg.editor then "True" else "False";
 
-    inherit (cfg) consoleMode;
+    inherit (cfg) consoleMode configurationLimit;
 
     inherit (efi) efiSysMountPoint canTouchEfiVariables;
 
@@ -57,6 +57,16 @@ in {
       '';
     };
 
+    configurationLimit = mkOption {
+      default = 100;
+      example = 120;
+      type = types.int;
+      description = ''
+        Maximum of configurations in boot menu. Otherwise boot partition could
+        run out of disk space.
+      '';
+    };
+
     consoleMode = mkOption {
       default = "keep";