about summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/grub/grub.nix
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2020-09-09 07:37:17 +0200
committerLinus Heckemann <git@sphalerite.org>2020-09-09 07:40:08 +0200
commitfdd944526ccbf2229df70bb7fa1538649642887c (patch)
treedd86ebcbe2288db9e633900c1ca710ab98596cc0 /nixos/modules/system/boot/loader/grub/grub.nix
parent61525137fd1002f6f2a5eb0ea27d480713362cd5 (diff)
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.
Diffstat (limited to 'nixos/modules/system/boot/loader/grub/grub.nix')
-rw-r--r--nixos/modules/system/boot/loader/grub/grub.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index 20e39628eabbc..2d6521b8bb743 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";
         }
         {