summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2014-05-02 00:45:06 -0500
committerWilliam A. Kennington III <william@wkennington.com>2014-08-28 13:35:36 -0700
commit3bf22679b30bc6f92b7df2a72cdba0403be3be86 (patch)
tree211174ca38c2d8d31999bea5c8bc037026ecbf9e /nixos
parent87d5e457fe124facb261d13f52e14a7c6e6511af (diff)
downloadnixlib-3bf22679b30bc6f92b7df2a72cdba0403be3be86.tar
nixlib-3bf22679b30bc6f92b7df2a72cdba0403be3be86.tar.gz
nixlib-3bf22679b30bc6f92b7df2a72cdba0403be3be86.tar.bz2
nixlib-3bf22679b30bc6f92b7df2a72cdba0403be3be86.tar.lz
nixlib-3bf22679b30bc6f92b7df2a72cdba0403be3be86.tar.xz
nixlib-3bf22679b30bc6f92b7df2a72cdba0403be3be86.tar.zst
nixlib-3bf22679b30bc6f92b7df2a72cdba0403be3be86.zip
nixos/grub: Kernels don't need to be copied if we can read the nix store
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/boot/loader/grub/install-grub.pl5
1 files changed, 5 insertions, 0 deletions
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";