diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py index be5151a4ae52..846787985cea 100644 --- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py +++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py @@ -187,8 +187,7 @@ 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") + f.write(f"timeout {TIMEOUT}\n") if profile: f.write("default nixos-%s-generation-*\n" % profile) else: 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 ca6f2315353a..bd4dbe96ff3a 100644 --- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix +++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix @@ -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;