Reduce memory requirements to 1GB
This commit is contained in:
parent
7d48cb7843
commit
2c54ebe7b8
2 changed files with 4 additions and 2 deletions
|
@ -11,7 +11,7 @@ Kexec is a mechanism in Linux to load a new kernel from a running Linux to
|
||||||
replace the current kernel. This is useful for booting the Nixos installer from
|
replace the current kernel. This is useful for booting the Nixos installer from
|
||||||
existing Linux distributions, such as server provider that do not offer a NixOS
|
existing Linux distributions, such as server provider that do not offer a NixOS
|
||||||
option. After running kexec, the NixOS installer exists only in memory. At the
|
option. After running kexec, the NixOS installer exists only in memory. At the
|
||||||
time of writing, this requires at least 1.5GB of physical RAM (swap does not
|
time of writing, this requires at least 1GB of physical RAM (swap does not
|
||||||
count) in the system. If not enough RAM is available, the initrd cannot be
|
count) in the system. If not enough RAM is available, the initrd cannot be
|
||||||
loaded. Because the NixOS runs only in RAM, users can reformat all the system's
|
loaded. Because the NixOS runs only in RAM, users can reformat all the system's
|
||||||
discs to prepare for a new NixOS installation.
|
discs to prepare for a new NixOS installation.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs
|
{ pkgs
|
||||||
|
, lib
|
||||||
, kexecTarball
|
, kexecTarball
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -24,7 +25,8 @@ makeTest' {
|
||||||
];
|
];
|
||||||
|
|
||||||
system.extraDependencies = [ kexecTarball ];
|
system.extraDependencies = [ kexecTarball ];
|
||||||
virtualisation.memorySize = 1 * 1024 + 256;
|
# TODO: remove the conditional after 23.11 is end-of-life
|
||||||
|
virtualisation.memorySize = 1 * 1024 + (if (lib.versionOlder lib.version "24.05pre") then 256 else 0);
|
||||||
virtualisation.diskSize = 4 * 1024;
|
virtualisation.diskSize = 4 * 1024;
|
||||||
virtualisation.forwardPorts = [{
|
virtualisation.forwardPorts = [{
|
||||||
host.port = 2222;
|
host.port = 2222;
|
||||||
|
|
Loading…
Reference in a new issue