Skip to content

Commit

Permalink
Merge pull request #801 from danjujan/master
Browse files Browse the repository at this point in the history
make-disk-image: use memSize as default build-memory in diskoImagesScript
  • Loading branch information
iFreilicht authored Sep 26, 2024
2 parents c1c472f + 18c5410 commit 1879e48
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/make-disk-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, diskoLib
, lib
, extendModules
, options
, ...
}:
let
Expand Down Expand Up @@ -130,7 +131,7 @@ in
* --build-memory <amt>
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
The default is 1024 MiB
The default is disko.memSize which defaults to ${builtins.toString options.disko.memSize.default} MiB
USAGE
}
Expand Down Expand Up @@ -200,7 +201,7 @@ in
''}
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+=" -m $build_memory"
export QEMU_OPTS
Expand Down

0 comments on commit 1879e48

Please sign in to comment.