Merge branch 'nixos-subdir'

Conflicts:
	nixos/modules/system/boot/loader/grub/grub.nix
This commit is contained in:
Luca Bruno 2015-06-13 15:18:12 +02:00
commit 033605e87f
3 changed files with 13 additions and 2 deletions

View File

@ -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;

View File

@ -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.

View File

@ -317,7 +317,7 @@ mountFS() {
# Try to find and mount the root device.
mkdir /mnt-root
mkdir -p $targetRoot
exec 3< @fsInfo@