From a6700d75f38cda83367a8af84651a2a72ce0f3ef Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 24 Jul 2021 09:33:10 +0200 Subject: [PATCH] vbox-image: add new option to set free space in image --- nixos/modules/virtualisation/virtualbox-image.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index 272c696807aa..853dd642a76d 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -18,6 +18,13 @@ in { The size of the VirtualBox base image in MiB. ''; }; + baseImageFreeSpace = mkOption { + type = with types; int; + default = 30 * 1024; + description = '' + Free space in the VirtualBox base image in MiB. + ''; + }; memorySize = mkOption { type = types.int; default = 1536; @@ -129,6 +136,7 @@ in { inherit pkgs lib config; partitionTableType = "legacy"; diskSize = cfg.baseImageSize; + additionalSpace = cfg.baseImageFreeSpace; postVM = ''