From 3bf22679b30bc6f92b7df2a72cdba0403be3be86 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 2 May 2014 00:45:06 -0500 Subject: [PATCH] nixos/grub: Kernels don't need to be copied if we can read the nix store --- nixos/modules/system/boot/loader/grub/install-grub.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index 82809edd6e86..d0d5307a804e 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -158,6 +158,11 @@ sub GrubFs { my $grubBoot = GrubFs("/boot"); my $grubStore = GrubFs("/nix"); +# We don't need to copy if we can read the kernels directly +if ($grubStore->search ne "") { + $copyKernels = 0; +} + # Generate the header. my $conf .= "# Automatically generated. DO NOT EDIT THIS FILE!\n";