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>
This commit is contained in:
Sirio Balmelli 2023-10-26 23:54:24 +02:00
parent 30d1e55e25
commit eac98ed50e
No known key found for this signature in database
GPG Key ID: 0437A96EFE4C426E

View File

@ -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;