about summary refs log tree commit diff
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
authorEmily <git@emilylange.de>2023-07-27 22:17:42 +0200
committerGitHub <noreply@github.com>2023-07-27 22:17:42 +0200
commit49c07cd259beba535e5febb48c7c4fb9af7318e1 (patch)
treed50a06f9950771bf86fbfd82811d2c323fd5c047 /nixos/modules/virtualisation
parent4b4bcea1512dcdfe19ad3c3e8f250b0040a4c3a4 (diff)
parentd7f89bbfb664f96768492f4b943c94a5f327ed51 (diff)
downloadnixlib-49c07cd259beba535e5febb48c7c4fb9af7318e1.tar
nixlib-49c07cd259beba535e5febb48c7c4fb9af7318e1.tar.gz
nixlib-49c07cd259beba535e5febb48c7c4fb9af7318e1.tar.bz2
nixlib-49c07cd259beba535e5febb48c7c4fb9af7318e1.tar.lz
nixlib-49c07cd259beba535e5febb48c7c4fb9af7318e1.tar.xz
nixlib-49c07cd259beba535e5febb48c7c4fb9af7318e1.tar.zst
nixlib-49c07cd259beba535e5febb48c7c4fb9af7318e1.zip
Merge pull request #238735 from MayNiklas/proxmox-image-settings
nixos/proxmox-image: add additionalSpace, bootSize and diskSize options
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/proxmox-image.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/proxmox-image.nix b/nixos/modules/virtualisation/proxmox-image.nix
index 1074b02d0ebd..1ea5434c8426 100644
--- a/nixos/modules/virtualisation/proxmox-image.nix
+++ b/nixos/modules/virtualisation/proxmox-image.nix
@@ -69,6 +69,34 @@ with lib;
           VM name
         '';
       };
+      additionalSpace = mkOption {
+        type = types.str;
+        default = "512M";
+        example = "2048M";
+        description = lib.mdDoc ''
+          additional disk space to be added to the image if diskSize "auto"
+          is used.
+        '';
+      };
+      bootSize = mkOption {
+        type = types.str;
+        default = "256M";
+        example = "512M";
+        description = lib.mdDoc ''
+          Size of the boot partition. Is only used if partitionTableType is
+          either "efi" or "hybrid".
+        '';
+      };
+      diskSize = mkOption {
+        type = types.str;
+        default = "auto";
+        example = "20480";
+        description = lib.mdDoc ''
+          The size of the disk, in megabytes.
+          if "auto" size is calculated based on the contents copied to it and
+          additionalSpace is taken into account.
+        '';
+      };
       net0 = mkOption {
         type = types.commas;
         default = "virtio=00:00:00:00:00:00,bridge=vmbr0,firewall=1";
@@ -236,6 +264,7 @@ with lib;
         mkdir -p $out/nix-support
         echo "file vma $out/vzdump-qemu-${cfg.filenameSuffix}.vma.zst" >> $out/nix-support/hydra-build-products
       '';
+      inherit (cfg.qemuConf) additionalSpace diskSize bootSize;
       format = "raw";
       inherit config lib pkgs;
     };