Merge pull request #801 from danjujan/master

make-disk-image: use memSize as default build-memory in diskoImagesScript
This commit is contained in:
Felix Uhl authored and GitHub committed 2024-09-26 12:50:29 +02:00
commit 1879e48907
1 file changed
+3 -2
+3 -2
View File
@@ -2,6 +2,7 @@
, diskoLib , diskoLib
, lib , lib
, extendModules , extendModules
, options
, ... , ...
}: }:
let let
@@ -130,7 +131,7 @@ in
* --build-memory <amt> * --build-memory <amt>
specify the amount of memory in MiB that gets allocated to the build VM specify the amount of memory in MiB that gets allocated to the build VM
This can be useful if you want to build images with a more involed NixOS config This can be useful if you want to build images with a more involed NixOS config
The default is 1024 MiB The default is disko.memSize which defaults to ${builtins.toString options.disko.memSize.default} MiB
USAGE USAGE
} }
@@ -200,7 +201,7 @@ in
''} ''}
export postVM=${diskoLib.writeCheckedBash { inherit pkgs checked; } "postVM.sh" postVM} export postVM=${diskoLib.writeCheckedBash { inherit pkgs checked; } "postVM.sh" postVM}
build_memory=''${build_memory:-1024} build_memory=''${build_memory:-${builtins.toString diskoCfg.memSize}}
QEMU_OPTS=${lib.escapeShellArg QEMU_OPTS} QEMU_OPTS=${lib.escapeShellArg QEMU_OPTS}
QEMU_OPTS+=" -m $build_memory" QEMU_OPTS+=" -m $build_memory"
export QEMU_OPTS export QEMU_OPTS