mirror of
https://github.com/nix-community/disko.git
synced 2024-09-17 09:37:17 +03:00
make-disk-image: make memSize configurable per disk
Sometimes the VM builder can run out of memory and fail to allocate memory when installing the system toplevel
This commit is contained in:
parent
169e99dc3d
commit
bd8fbc3f27
@ -65,7 +65,7 @@ in
|
||||
{
|
||||
buildInputs = dependencies;
|
||||
inherit preVM postVM QEMU_OPTS;
|
||||
memSize = 1024;
|
||||
memSize = nixosConfig.config.disko.memSize;
|
||||
}
|
||||
(partitioner + installer));
|
||||
impure = diskoLib.writeCheckedBash { inherit checked pkgs; } name ''
|
||||
|
@ -10,6 +10,13 @@ let
|
||||
in
|
||||
{
|
||||
options.disko = {
|
||||
memSize = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
description = ''
|
||||
size of the memory passed to runInLinuxVM, in megabytes
|
||||
'';
|
||||
default = 1024;
|
||||
};
|
||||
devices = lib.mkOption {
|
||||
type = diskoLib.toplevel;
|
||||
default = { };
|
||||
|
Loading…
Reference in New Issue
Block a user