diff options
author | Thomas Watson <twatson52@icloud.com> | 2023-01-16 15:31:52 -0600 |
---|---|---|
committer | Will Fancher <elvishjerricco@gmail.com> | 2023-11-12 02:07:25 -0500 |
commit | ca84c463b9241a2b1e425d5f0d494997919845e9 (patch) | |
tree | da356a1b59a27ab3f6ccdc0201520f0019134aa9 /nixos/modules/system | |
parent | d638da8b6a17041483d90ba9af6c3b5e30b4fbcc (diff) |
nixos/systemd-boot: pass EFI variable flags during update too
8f2babd0326e was partially reverted by mistake. Original message below --- On some systems, EFI variables are not supported or otherwise wonky. bootctl attempting to access them causes failures during bootloader installations and updates. For such systems, NixOS provides the options `boot.loader.efi.canTouchEfiVariables` and `boot.loader.systemd-boot.graceful` which pass flags to bootctl that change whether and how EFI variables are accessed. Previously, these flags were only passed to bootctl during an install operation. However, they also apply during an update operation, which can cause the same sorts of errors. This change passes the flags during update operations as well to prevent those errors. Fixes https://github.com/NixOS/nixpkgs/issues/151336
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 310584e398bc1..d70d6fc223661 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 @@ -268,7 +268,7 @@ def install_bootloader(args: argparse.Namespace) -> None: if installed_version < available_version: print("updating systemd-boot from %s to %s" % (installed_version, available_version)) - subprocess.check_call(["@systemd@/bin/bootctl", "--esp-path=@efiSysMountPoint@", "update"]) + subprocess.check_call(["@systemd@/bin/bootctl", "--esp-path=@efiSysMountPoint@"] + bootctl_flags + ["update"]) os.makedirs("@efiSysMountPoint@/efi/nixos", exist_ok=True) os.makedirs("@efiSysMountPoint@/loader/entries", exist_ok=True) |