From 0234fbb0b1016a1b996f6cf9eb6a4f322deef77b Mon Sep 17 00:00:00 2001 From: Victor Fuentes Date: Wed, 15 Oct 2025 15:08:07 -0700 Subject: [PATCH] nixos/google-compute-image: add buildMemSize option --- nixos/modules/virtualisation/google-compute-image.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/modules/virtualisation/google-compute-image.nix b/nixos/modules/virtualisation/google-compute-image.nix index e1021c755aea..305758756a38 100644 --- a/nixos/modules/virtualisation/google-compute-image.nix +++ b/nixos/modules/virtualisation/google-compute-image.nix @@ -57,6 +57,12 @@ in ''; }; + virtualisation.googleComputeImage.buildMemSize = mkOption { + type = types.int; + default = 1024; + description = "Memory size (in MiB) for the temporary VM used to build the image."; + }; + virtualisation.googleComputeImage.contents = mkOption { type = with types; listOf attrs; default = [ ]; @@ -129,6 +135,7 @@ in inherit (cfg) contents; partitionTableType = if cfg.efi then "efi" else "legacy"; inherit (config.virtualisation) diskSize; + memSize = cfg.buildMemSize; inherit config lib pkgs; };