From 5be23fe888bc0ad93ab94b62f8aad9db494b3470 Mon Sep 17 00:00:00 2001 From: Rickard Nilsson Date: Tue, 23 Sep 2014 14:34:44 +0200 Subject: [PATCH] nixos/install-grub: Don't run GrubFs(/nix/store) if copyKernels is true --- nixos/modules/system/boot/loader/grub/install-grub.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index eef81d81484..3128d1db098 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -199,7 +199,10 @@ sub GrubFs { return Grub->new(path => $path, search => $search); } my $grubBoot = GrubFs("/boot"); -my $grubStore = GrubFs("/nix/store"); +my $grubStore; +if ($copyKernels == 0) { + my $grubStore = GrubFs("/nix/store"); +} # Generate the header. my $conf .= "# Automatically generated. DO NOT EDIT THIS FILE!\n";