From 0e59fa35184e1fe9d335af36f3f4a9436eb9cee4 Mon Sep 17 00:00:00 2001 From: Zuckerberg Date: Sun, 18 Feb 2024 17:30:12 -0700 Subject: [PATCH] Add easy boot configuration profile limit --- common/boot/bios.nix | 6 +++++- common/boot/efi.nix | 6 +++++- machines/ponyo/hardware-configuration.nix | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/common/boot/bios.nix b/common/boot/bios.nix index 434b9f4..67bdfe0 100644 --- a/common/boot/bios.nix +++ b/common/boot/bios.nix @@ -10,6 +10,10 @@ in device = mkOption { type = types.str; }; + configurationLimit = mkOption { + default = 20; + type = types.int; + }; }; config = mkIf cfg.enable { @@ -19,7 +23,7 @@ in enable = true; device = cfg.device; useOSProber = true; - configurationLimit = 20; + configurationLimit = cfg.configurationLimit; theme = pkgs.nixos-grub2-theme; }; }; diff --git a/common/boot/efi.nix b/common/boot/efi.nix index 6789fce..9b52200 100644 --- a/common/boot/efi.nix +++ b/common/boot/efi.nix @@ -7,6 +7,10 @@ in { options.efi = { enable = mkEnableOption "enable efi boot"; + configurationLimit = mkOption { + default = 20; + type = types.int; + }; }; config = mkIf cfg.enable { @@ -19,7 +23,7 @@ in efiSupport = true; useOSProber = true; # memtest86.enable = true; - configurationLimit = 20; + configurationLimit = cfg.configurationLimit; theme = pkgs.nixos-grub2-theme; }; }; diff --git a/machines/ponyo/hardware-configuration.nix b/machines/ponyo/hardware-configuration.nix index b570922..21085a7 100644 --- a/machines/ponyo/hardware-configuration.nix +++ b/machines/ponyo/hardware-configuration.nix @@ -16,6 +16,7 @@ bios = { enable = true; device = "/dev/sda"; + configurationLimit = 3; # Save room in /nix/store }; remoteLuksUnlock.enable = true;