7 virtualisation.diskSizeAutoSupported = lib.mkOption {
11 Whether the current image builder or vm runner supports `virtualisation.diskSize = "auto".`
16 virtualisation.diskSize = lib.mkOption {
17 type = t.either (t.enum [ "auto" ]) t.ints.positive;
18 default = if config.virtualisation.diskSizeAutoSupported then "auto" else 1024;
19 defaultText = lib.literalExpression "if virtualisation.diskSizeAutoSupported then \"auto\" else 1024";
21 The disk size in megabytes of the virtual machine.
28 inherit (config.virtualisation) diskSize diskSizeAutoSupported;
33 assertion = diskSize != "auto" || diskSizeAutoSupported;
34 message = "Setting virtualisation.diskSize to `auto` is not supported by the current image build or vm runner; use an explicit size.";