diff options
author | Nathan Henrie <nate@n8henrie.com> | 2022-12-05 11:46:59 -0700 |
---|---|---|
committer | Nathan Henrie <nate@n8henrie.com> | 2022-12-24 09:27:43 -0700 |
commit | 7e1a3e4a8f6cf85cd39d460222e52fe041a95c1c (patch) | |
tree | 6b57e5aeee64d680c5b29a10fc0a6c6ab6259075 /nixos/modules/installer | |
parent | 7b560e9728ee593da83014f67ca2e9c3144bd578 (diff) |
nixos/installer/cd-dvd/iso-image: Honor boot.loader.timeout for EFI
EFI boot timeout is currently a static 10 whereas syslinux uses boot.loader.timeout. This changes the EFI config to match. Some discussion at https://discourse.nixos.org/t/how-to-override-let-variables/23741/2
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r-- | nixos/modules/installer/cd-dvd/iso-image.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 81aca86173899..659df7851b08d 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -77,6 +77,14 @@ let else config.boot.loader.timeout * 10; + # Timeout in grub is in seconds. + # null means max timeout (infinity) + # 0 means disable timeout + grubEfiTimeout = if config.boot.loader.timeout == null then + -1 + else + config.boot.loader.timeout; + # The configuration file for syslinux. # Notes on syslinux configuration and UNetbootin compatibility: @@ -284,7 +292,7 @@ let if serial; then set with_serial=yes ;fi export with_serial clear - set timeout=10 + set timeout=${toString grubEfiTimeout} # This message will only be viewable when "gfxterm" is not used. echo "" |