mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 12:45:27 +03:00
nixos/virtualbox: add swap file
Puts 2G swap in /var/swap of OVA. This serves as backup when you hit the memory cap for the image. Fixes #57171 and fixes #22696
This commit is contained in:
parent
1e7bac9401
commit
dbc4543812
1 changed files with 5 additions and 0 deletions
|
@ -99,6 +99,11 @@ in {
|
||||||
boot.growPartition = true;
|
boot.growPartition = true;
|
||||||
boot.loader.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/sda";
|
||||||
|
|
||||||
|
swap.swapDevices = {
|
||||||
|
device = "/var/swap";
|
||||||
|
size = 2048;
|
||||||
|
};
|
||||||
|
|
||||||
virtualisation.virtualbox.guest.enable = true;
|
virtualisation.virtualbox.guest.enable = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue