From 11d0c5ab3e9d4d1b7808469d6a2af182289d1b96 Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.dev>
Date: Sun, 9 Jun 2024 21:05:01 +0100
Subject: [PATCH] Set `systemd-boot` configuration limit

---
 lib/nixos/configuration.nix | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/lib/nixos/configuration.nix b/lib/nixos/configuration.nix
index e012ac5c..d233a597 100644
--- a/lib/nixos/configuration.nix
+++ b/lib/nixos/configuration.nix
@@ -22,9 +22,19 @@ in {
   nixpkgs.config.allowUnfree = true;
 
   # Bootloader.
-  boot.loader.systemd-boot.enable = true;
-  boot.loader.efi.canTouchEfiVariables = true;
-  boot.loader.efi.efiSysMountPoint = "/boot/efi";
+  boot = {
+    loader = {
+      systemd-boot = {
+        enable = true;
+        configurationLimit = 10;
+      };
+
+      efi = {
+        canTouchEfiVariables = true;
+        efiSysMountPoint = "/boot/efi";
+      };
+    };
+  };
 
   services.thermald.enable = true;
   services.power-profiles-daemon.enable = false;