1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00

Merge pull request #125366 from mkg20001/vbox-export-params

This commit is contained in:
Maciej Krüger 2021-06-28 06:58:01 +02:00 committed by GitHub
commit b877b70d32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,7 +58,19 @@ in {
Run <literal>VBoxManage modifyvm --help</literal> to see more options.
'';
};
};
exportParams = mkOption {
type = with types; listOf (oneOf [ str int bool (listOf str) ]);
example = [
"--vsys" "0" "--vendor" "ACME Inc."
];
default = [];
description = ''
Parameters passed to the Virtualbox export command.
Run <literal>VBoxManage export --help</literal> to see more options.
'';
};
extraDisk = mkOption {
description = ''
Optional extra disk/hdd configuration.
@ -158,7 +170,7 @@ in {
echo "exporting VirtualBox VM..."
mkdir -p $out
fn="$out/${cfg.vmFileName}"
VBoxManage export "$vmName" --output "$fn" --options manifest
VBoxManage export "$vmName" --output "$fn" --options manifest ${escapeShellArgs cfg.exportParams}
rm -v $diskImage