Skip to content

Commit

Permalink
allow to use multiple cores in make-disk-image
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Dec 5, 2024
1 parent 956f09d commit 34dd137
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/make-disk-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ in
build_memory=''${build_memory:-${builtins.toString diskoCfg.memSize}}
QEMU_OPTS=${lib.escapeShellArg QEMU_OPTS}
QEMU_OPTS+=" -m $build_memory"
if [ ''${NIX_BUILD_CORES:-0} = 0 ]; then
QEMU_OPTS+=" -smp cpus=$(nproc)"
else
QEMU_OPTS+=" -smp cpus=$NIX_BUILD_CORES"
fi
export QEMU_OPTS
${pkgs.bash}/bin/sh -e ${vmTools.vmRunCommand vmTools.qemuCommandLinux}
Expand Down

0 comments on commit 34dd137

Please sign in to comment.