mirror of
https://github.com/nix-community/disko.git
synced 2026-12-03 14:33:28 +01:00
Merge pull request #801 from danjujan/master
make-disk-image: use memSize as default build-memory in diskoImagesScript
This commit is contained in:
1 file changed
+3
-2
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user