about summary refs log tree commit diff
path: root/nixos/maintainers/scripts
diff options
context:
space:
mode:
authorSirio Balmelli <sirio@b-ad.ch>2023-10-26 23:54:24 +0200
committerSirio Balmelli <sirio@b-ad.ch>2023-10-31 08:28:45 +0100
commiteac98ed50efe959941340505aedb0020f4fad896 (patch)
tree2f39200034287044afd082e2f956ac835bdf81a4 /nixos/maintainers/scripts
parent30d1e55e257ec68c55c87c5b446ceea8fc1fb038 (diff)
openstack-image-zfs: add 'ramMB' option to configure build VM memory
Increase 'ramMB' to avoid OOM errors when building images.

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
Diffstat (limited to 'nixos/maintainers/scripts')
-rw-r--r--nixos/maintainers/scripts/openstack/openstack-image-zfs.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix b/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix
index 936dcee12949e..60f0535854dd5 100644
--- a/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix
+++ b/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix
@@ -20,6 +20,12 @@ in
       default = "nixos-openstack-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
     };
 
+    ramMB = mkOption {
+      type = types.int;
+      default = 1024;
+      description = lib.mdDoc "RAM allocation for build VM";
+    };
+
     sizeMB = mkOption {
       type = types.int;
       default = 8192;
@@ -64,7 +70,7 @@ in
       includeChannel = copyChannel;
 
       bootSize = 1000;
-
+      memSize = cfg.ramMB;
       rootSize = cfg.sizeMB;
       rootPoolProperties = {
         ashift = 12;