nixos/virtualbox-image: add exportParams
This allows the user to specify custom export parameters like adding a vendor to the exported VM
This commit is contained in:
parent
aa47d87c82
commit
5faa7056f9
@ -58,7 +58,19 @@ in {
|
|||||||
|
|
||||||
Run <literal>VBoxManage modifyvm --help</literal> to see more options.
|
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 {
|
extraDisk = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Optional extra disk/hdd configuration.
|
Optional extra disk/hdd configuration.
|
||||||
@ -158,7 +170,7 @@ in {
|
|||||||
echo "exporting VirtualBox VM..."
|
echo "exporting VirtualBox VM..."
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
fn="$out/${cfg.vmFileName}"
|
fn="$out/${cfg.vmFileName}"
|
||||||
VBoxManage export "$vmName" --output "$fn" --options manifest
|
VBoxManage export "$vmName" --output "$fn" --options manifest ${escapeShellArgs cfg.exportParams}
|
||||||
|
|
||||||
rm -v $diskImage
|
rm -v $diskImage
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user