mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
nixos/qemu-vm: Rename pathsInNixDB to additionalPaths
pathsInNixDB isn't a very accurate name when a Nix store image is built (virtualisation.useNixStoreImage); rename it to additionalPaths, which should be general enough to cover both cases.
This commit is contained in:
parent
84839b395f
commit
af9f6d9a2a
@ -177,7 +177,7 @@ let
|
||||
'';
|
||||
|
||||
|
||||
regInfo = pkgs.closureInfo { rootPaths = config.virtualisation.pathsInNixDB; };
|
||||
regInfo = pkgs.closureInfo { rootPaths = config.virtualisation.additionalPaths; };
|
||||
|
||||
|
||||
# Generate a hard disk image containing a /boot partition and GRUB
|
||||
@ -286,6 +286,7 @@ in
|
||||
{
|
||||
imports = [
|
||||
../profiles/qemu-guest.nix
|
||||
(mkRenamedOptionModule [ "virtualisation" "pathsInNixDB" ] [ "virtualisation" "additionalPaths" ])
|
||||
];
|
||||
|
||||
options = {
|
||||
@ -417,17 +418,23 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
virtualisation.pathsInNixDB =
|
||||
virtualisation.additionalPaths =
|
||||
mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [];
|
||||
description =
|
||||
''
|
||||
The list of paths whose closure is registered in the Nix
|
||||
database in the VM. All other paths in the host Nix store
|
||||
A list of paths whose closure should be made available to
|
||||
the VM.
|
||||
|
||||
When 9p is used, the closure is registered in the Nix
|
||||
database in the VM. All other paths in the host Nix store
|
||||
appear in the guest Nix store as well, but are considered
|
||||
garbage (because they are not registered in the Nix
|
||||
database in the guest).
|
||||
database of the guest).
|
||||
|
||||
When <option>virtualisation.useNixStoreImage</option> is
|
||||
set, the closure is copied to the Nix store image.
|
||||
'';
|
||||
};
|
||||
|
||||
@ -772,7 +779,7 @@ in
|
||||
'';
|
||||
|
||||
# After booting, register the closure of the paths in
|
||||
# `virtualisation.pathsInNixDB' in the Nix database in the VM. This
|
||||
# `virtualisation.additionalPaths' in the Nix database in the VM. This
|
||||
# allows Nix operations to work in the VM. The path to the
|
||||
# registration file is passed through the kernel command line to
|
||||
# allow `system.build.toplevel' to be included. (If we had a direct
|
||||
@ -791,7 +798,7 @@ in
|
||||
|
||||
virtualisation.bootDevice = mkDefault (driveDeviceName 1);
|
||||
|
||||
virtualisation.pathsInNixDB = [ config.system.build.toplevel ];
|
||||
virtualisation.additionalPaths = [ config.system.build.toplevel ];
|
||||
|
||||
virtualisation.sharedDirectories = {
|
||||
nix-store = mkIf (!cfg.useNixStoreImage) {
|
||||
|
@ -56,7 +56,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
};
|
||||
|
||||
|
||||
virtualisation.pathsInNixDB = [ pkgs.stdenv ];
|
||||
virtualisation.additionalPaths = [ pkgs.stdenv ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
|
@ -45,7 +45,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.pathsInNixDB = [ pkgs.stdenv ];
|
||||
virtualisation.additionalPaths = [ pkgs.stdenv ];
|
||||
};
|
||||
|
||||
testScript =
|
||||
|
@ -17,7 +17,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
virtualisation.memorySize = 1024;
|
||||
# Make sure we always have all the required dependencies for creating a
|
||||
# container available within the VM, because we don't have network access.
|
||||
virtualisation.pathsInNixDB = let
|
||||
virtualisation.additionalPaths = let
|
||||
emptyContainer = import ../lib/eval-config.nix {
|
||||
inherit (config.nixpkgs.localSystem) system;
|
||||
modules = lib.singleton {
|
||||
|
@ -27,7 +27,7 @@ in import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
|
||||
containers.webserver4 = webserverFor "10.231.136.1" "10.231.136.2";
|
||||
containers.webserver6 = webserverFor "fc00::2" "fc00::1";
|
||||
virtualisation.pathsInNixDB = [ pkgs.stdenv ];
|
||||
virtualisation.additionalPaths = [ pkgs.stdenv ];
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: ''
|
||||
|
@ -29,7 +29,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.pathsInNixDB = [ pkgs.stdenv ];
|
||||
virtualisation.additionalPaths = [ pkgs.stdenv ];
|
||||
};
|
||||
|
||||
testScript =
|
||||
|
@ -26,7 +26,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
config = { };
|
||||
};
|
||||
|
||||
virtualisation.pathsInNixDB = [ pkgs.stdenv ];
|
||||
virtualisation.additionalPaths = [ pkgs.stdenv ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
|
Loading…
Reference in New Issue
Block a user