diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index c790e05f51b..1fb2e20949a 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -354,7 +354,7 @@ in export PERL5LIB=${makePerlPath (with pkgs.perlPackages; [ FileSlurp XMLLibXML XMLSAX ListCompare ])} ${optionalString cfg.enableCryptodisk "export GRUB_ENABLE_CRYPTODISK=y"} '' + flip concatMapStrings cfg.mirroredBoots (args: '' - ${pkgs.perl}/bin/perl ${./install-grub.pl} ${grubConfig args} + ${pkgs.perl}/bin/perl ${./install-grub.pl} ${grubConfig args} $@ '')); system.build.grub = grub; diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index a0384d23f82..3ca30b58023 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -11,7 +11,7 @@ require List::Compare; use POSIX; use Cwd; -my $defaultConfig = $ARGV[0] or die; +my $defaultConfig = $ARGV[1] or die; my $dom = XML::LibXML->load_xml(location => $ARGV[0]);