1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

nixos/systemd-boot: fix infinite timeout

This commit is contained in:
Maëlys Bras de fer 2024-08-05 08:48:54 +00:00
parent 31c76b1c40
commit 7ae6219163
2 changed files with 2 additions and 3 deletions

View file

@ -181,7 +181,6 @@ def system_dir(profile: str | None, generation: int, specialisation: str | None)
def write_loader_conf(profile: str | None) -> None:
with open(f"{EFI_SYS_MOUNT_POINT}/loader/loader.conf.tmp", 'w') as f:
if TIMEOUT != "":
f.write(f"timeout {TIMEOUT}\n")
if profile:
f.write("default nixos-%s-generation-*\n" % profile)

View file

@ -36,7 +36,7 @@ let
nix = config.nix.package.out;
timeout = optionalString (config.boot.loader.timeout != null) config.boot.loader.timeout;
timeout = if config.boot.loader.timeout == null then "menu-force" else config.boot.loader.timeout;
configurationLimit = if cfg.configurationLimit == null then 0 else cfg.configurationLimit;