diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2023-07-28 17:26:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 17:26:24 +0200 |
commit | fd304ecc8ac7cc8a0348c48908331e6da1426104 (patch) | |
tree | b556c27bef1fbb730cb77f8cc41f01b494f9761c /nixos/modules/system/boot | |
parent | 56fc24812e203b86aae87248569de8a18027d039 (diff) | |
parent | 53135cc8c7e8fa6d562bea8fc68dc5b553a7e76a (diff) |
Merge pull request #236027 from iliana/grub-dont-die
nixos/grub: don't die on EFI-only systems if devices != ["nodev"]
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r-- | nixos/modules/system/boot/loader/grub/grub.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index 66b54155fbfbc..8f2f578e3070c 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -40,7 +40,10 @@ let backgroundColor = f cfg.backgroundColor; entryOptions = f cfg.entryOptions; subEntryOptions = f cfg.subEntryOptions; - grub = f grub; + # PC platforms (like x86_64-linux) have a non-EFI target (`grubTarget`), but other platforms + # (like aarch64-linux) have an undefined `grubTarget`. Avoid providing the path to a non-EFI + # GRUB on those platforms. + grub = f (if (grub.grubTarget or "") != "" then grub else ""); grubTarget = f (grub.grubTarget or ""); shell = "${pkgs.runtimeShell}"; fullName = lib.getName realGrub; |