From fdd944526ccbf2229df70bb7fa1538649642887c Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Wed, 9 Sep 2020 07:37:17 +0200 Subject: [PATCH] nixos/grub: allow multiple "nodev" devices for mirroredBoots For UEFI setups, "device" will generally be the special value "nodev" which represents not running grub-install at all. Using "nodev" for boot mirrors should therefore be allowed. --- nixos/modules/system/boot/loader/grub/grub.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index 20e39628eab..2d6521b8bb7 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -741,7 +741,7 @@ in + "'boot.loader.grub.mirroredBoots' to make the system bootable."; } { - assertion = cfg.efiSupport || all (c: c < 2) (mapAttrsToList (_: c: c) bootDeviceCounters); + assertion = cfg.efiSupport || all (c: c < 2) (mapAttrsToList (n: c: if n == "nodev" then 0 else c) bootDeviceCounters); message = "You cannot have duplicated devices in mirroredBoots"; } {