summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2015-06-13 15:18:12 +0200
committerLuca Bruno <lucabru@src.gnome.org>2015-06-13 15:18:12 +0200
commit033605e87f150d19919aefaa4d65006b55e9f456 (patch)
treea8328c9839884c296b3dba1d505bd3af7ff91605 /nixos/modules/system/boot/loader
parentea3382bb69e542b7af7cdc1407abd9e0dc757c68 (diff)
parentc3e832b323deced79b49ecf42a06714e2aa661e9 (diff)
downloadnixlib-033605e87f150d19919aefaa4d65006b55e9f456.tar
nixlib-033605e87f150d19919aefaa4d65006b55e9f456.tar.gz
nixlib-033605e87f150d19919aefaa4d65006b55e9f456.tar.bz2
nixlib-033605e87f150d19919aefaa4d65006b55e9f456.tar.lz
nixlib-033605e87f150d19919aefaa4d65006b55e9f456.tar.xz
nixlib-033605e87f150d19919aefaa4d65006b55e9f456.tar.zst
nixlib-033605e87f150d19919aefaa4d65006b55e9f456.zip
Merge branch 'nixos-subdir'
Conflicts:
	nixos/modules/system/boot/loader/grub/grub.nix
Diffstat (limited to 'nixos/modules/system/boot/loader')
-rw-r--r--nixos/modules/system/boot/loader/grub/grub.nix10
-rw-r--r--nixos/modules/system/boot/loader/grub/install-grub.pl3
2 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index 449f58ae4dda..3c879450ba6d 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -41,6 +41,7 @@ let
       grubEfi = f grubEfi;
       grubTargetEfi = if cfg.efiSupport && (cfg.version == 2) then f (grubEfi.grubTarget or "") else "";
       bootPath = args.path;
+      storePath = config.boot.loader.grub.storePath;
       bootloaderId = if args.efiBootloaderId == null then "NixOS${efiSysMountPoint'}" else args.efiBootloaderId;
       inherit efiSysMountPoint;
       inherit (args) devices;
@@ -180,6 +181,15 @@ in
         '';
       };
 
+      storePath = mkOption {
+        default = "/nix/store";
+        type = types.str;
+        description = ''
+          Path to the Nix store when looking for kernels at boot.
+          Only makes sense when copyKernels is false.
+        '';
+      };
+
       extraPrepareConfig = mkOption {
         default = "";
         type = types.lines;
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl
index 66d82e091d1f..9db4c4003c9b 100644
--- a/nixos/modules/system/boot/loader/grub/install-grub.pl
+++ b/nixos/modules/system/boot/loader/grub/install-grub.pl
@@ -55,6 +55,7 @@ my $fsIdentifier = get("fsIdentifier");
 my $grubEfi = get("grubEfi");
 my $grubTargetEfi = get("grubTargetEfi");
 my $bootPath = get("bootPath");
+my $storePath = get("storePath");
 my $canTouchEfiVariables = get("canTouchEfiVariables");
 my $efiSysMountPoint = get("efiSysMountPoint");
 my $gfxmodeEfi = get("gfxmodeEfi");
@@ -213,7 +214,7 @@ sub GrubFs {
 my $grubBoot = GrubFs($bootPath);
 my $grubStore;
 if ($copyKernels == 0) {
-    $grubStore = GrubFs("/nix/store");
+    $grubStore = GrubFs($storePath);
 }
 
 # Generate the header.