diff options
author | Maciej Krüger <mkg20001@gmail.com> | 2021-06-28 06:58:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-28 06:58:01 +0200 |
commit | b877b70d32a3eb4dc618708801e21d2b848c7f41 (patch) | |
tree | 12caef9213355a03c9249a2c2dd270ea5bd5d15c /nixos | |
parent | bb62664a1a5c8e35842d58504a9aa31abadad336 (diff) | |
parent | 5faa7056f9ee3dc11096742da4d2eda627b6514f (diff) |
Merge pull request #125366 from mkg20001/vbox-export-params
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/virtualisation/virtualbox-image.nix | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index 071edda826935..272c696807aa1 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -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 |