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:

committed by
mergify[bot]
![mergify[bot]](/assets/img/avatar_default.png)
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 = { };
|
||||
|
Reference in New Issue
Block a user