by default, don't use a tmpfs for the /nix/store in the VM tests
This commit is contained in:
parent
301fe041c4
commit
5d541b9b30
2 changed files with 13 additions and 1 deletions
6
tests/README.md
Normal file
6
tests/README.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Notes for running the tests
|
||||
|
||||
The VM tests do Nix builds inside the VMs, so they have writable Nix stores.
|
||||
Writable Nix stores in NixOS VM tests are, by default, tmpfs, but to speed up IO for the in-VM `nixos-rebuild`s, `./module-allow-rebuild-in-vm.nix` instead sets `virtualisation.writableStoreUseTmpfs = false;`, and allocates a much larger root filesystem for the VM.
|
||||
Specifically, each VM test allocates 20 GiB.
|
||||
If you are running low on disk space, disable `virtualisation.writableStoreUseTmpfs` in `./module-allow-rebuild-in-vm`.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ name, config, ... }:
|
||||
{ name, lib, config, ... }:
|
||||
|
||||
{
|
||||
system.includeBuildDependencies = true;
|
||||
|
|
@ -12,6 +12,12 @@
|
|||
mountHostNixStore = true;
|
||||
installBootLoader = true;
|
||||
|
||||
# Moderately improves performance of `nixos-rebuild` inside the VM on my machine,
|
||||
# (205.48 seconds to 186.42 seconds), but we have to allocate much more space.
|
||||
writableStoreUseTmpfs = false;
|
||||
# 20 GiB ought to be enough.
|
||||
diskSize = lib.mkIf (!config.virtualisation.writableStoreUseTmpfs) (20 * 1024);
|
||||
|
||||
# With how much memory Nix eval uses, this is essentially required.
|
||||
memorySize = 8192;
|
||||
cores = 8;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue