Skip to content

Commit

Permalink
Merge pull request #120487 from lukegb/temp-ec2-fixed-disk
Browse files Browse the repository at this point in the history
treewide: revert auto disk sizing for images
  • Loading branch information
lukegb committed Apr 24, 2021
2 parents d97478e + 4fb91cb commit 93de027
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 22 deletions.
1 change: 1 addition & 0 deletions nixos/maintainers/scripts/cloudstack/cloudstack-image.nix
Expand Up @@ -10,6 +10,7 @@ with lib;

system.build.cloudstackImage = import ../../../lib/make-disk-image.nix {
inherit lib config pkgs;
diskSize = 8192;
format = "qcow2";
configFile = pkgs.writeText "configuration.nix"
''
Expand Down
4 changes: 1 addition & 3 deletions nixos/maintainers/scripts/ec2/amazon-image.nix
Expand Up @@ -40,10 +40,8 @@ in {
};

sizeMB = mkOption {
type = with types; either (enum [ "auto" ]) int;
# TODO(lukegb): this should be "auto"; see #120473
type = types.int;
default = if config.ec2.hvm then 2048 else 8192;
example = 8192;
description = "The size in MB of the image";
};

Expand Down
2 changes: 1 addition & 1 deletion nixos/maintainers/scripts/openstack/openstack-image.nix
Expand Up @@ -12,8 +12,8 @@ with lib;

system.build.openstackImage = import ../../../lib/make-disk-image.nix {
inherit lib config;
additionalSpace = "1024M";
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
diskSize = 8192;
format = "qcow2";
configFile = pkgs.writeText "configuration.nix"
''
Expand Down
5 changes: 2 additions & 3 deletions nixos/modules/virtualisation/azure-image.nix
Expand Up @@ -9,9 +9,8 @@ in

options = {
virtualisation.azureImage.diskSize = mkOption {
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 2048;
type = with types; int;
default = 2048;
description = ''
Size of disk image. Unit is MB.
'';
Expand Down
5 changes: 2 additions & 3 deletions nixos/modules/virtualisation/digital-ocean-image.nix
Expand Up @@ -10,9 +10,8 @@ in

options = {
virtualisation.digitalOceanImage.diskSize = mkOption {
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 4096;
type = with types; int;
default = 4096;
description = ''
Size of disk image. Unit is MB.
'';
Expand Down
5 changes: 2 additions & 3 deletions nixos/modules/virtualisation/google-compute-image.nix
Expand Up @@ -18,9 +18,8 @@ in

options = {
virtualisation.googleComputeImage.diskSize = mkOption {
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 1536;
type = with types; int;
default = 1536;
description = ''
Size of disk image. Unit is MB.
'';
Expand Down
5 changes: 2 additions & 3 deletions nixos/modules/virtualisation/hyperv-image.nix
Expand Up @@ -9,9 +9,8 @@ in {
options = {
hyperv = {
baseImageSize = mkOption {
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 2048;
type = types.int;
default = 2048;
description = ''
The size of the hyper-v base image in MiB.
'';
Expand Down
5 changes: 2 additions & 3 deletions nixos/modules/virtualisation/virtualbox-image.nix
Expand Up @@ -11,9 +11,8 @@ in {
options = {
virtualbox = {
baseImageSize = mkOption {
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 50 * 1024;
type = types.int;
default = 50 * 1024;
description = ''
The size of the VirtualBox base image in MiB.
'';
Expand Down
5 changes: 2 additions & 3 deletions nixos/modules/virtualisation/vmware-image.nix
Expand Up @@ -18,9 +18,8 @@ in {
options = {
vmware = {
baseImageSize = mkOption {
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 2048;
type = types.int;
default = 2048;
description = ''
The size of the VMWare base image in MiB.
'';
Expand Down

0 comments on commit 93de027

Please sign in to comment.