diff options
author | Jake Schurch <jakeschurch@gmail.com> | 2023-06-26 18:39:56 -0400 |
---|---|---|
committer | Jake Schurch <jakeschurch@gmail.com> | 2023-07-29 20:47:46 -0400 |
commit | f2794786fdd79247e2d0b8d92fe670a45d1d7cca (patch) | |
tree | 76443d75fa6bc84ce705900e92bc79ae009feb1d /nixos/modules/virtualisation | |
parent | d784a110b6405473678a4d0b16072fabc32a7ce7 (diff) |
proxmox-image: add additionalDiskSpace parameter as input to make-disk-image.nix
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/proxmox-image.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/proxmox-image.nix b/nixos/modules/virtualisation/proxmox-image.nix index b5d4ecd026839..4d1ee8e6143a2 100644 --- a/nixos/modules/virtualisation/proxmox-image.nix +++ b/nixos/modules/virtualisation/proxmox-image.nix @@ -94,6 +94,15 @@ with lib; Expect guest to have qemu agent running ''; }; + + additionalDiskSize = mkOption { + type = types.str; + default = "512M"; + description = lib.mdDoc '' + Additional disk space to be added to the image. + Defaults to 512M (Megabytes), Suffix can also be specified with `G` (gigabyte) or `K` (kilobyte). + ''; + }; }; qemuExtraConf = mkOption { type = with types; attrsOf (oneOf [ str int ]); @@ -117,6 +126,14 @@ with lib; defaultText = lib.literalExpression ''if config.proxmox.qemuConf.bios == "seabios" then "legacy" else "efi"''; example = "hybrid"; }; + additionalDiskSpace = mkOption { + type = types.str; + default = "512M"; + description = lib.mdDoc '' + Additional disk space to be added to the image. + Defaults to 512M (Megabytes), Suffix can also be specified with `G` (gigabyte) or `K` (kilobyte). + ''; + }; filenameSuffix = mkOption { type = types.str; default = config.proxmox.qemuConf.name; @@ -168,6 +185,7 @@ with lib; system.build.VMA = import ../../lib/make-disk-image.nix { name = "proxmox-${cfg.filenameSuffix}"; inherit partitionTableType; + additionalSpace = config.proxmox.additionalDiskSpace; postVM = let # Build qemu with PVE's patch that adds support for the VMA format vma = (pkgs.qemu_kvm.override { |