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
commitdbc4543812ab9cee01ed800d2da91a644aa65be3
authorMatthew Bauer <mjbauer95@gmail.com>
dateTue 12 Mar 2019, 21:24 (8 years ago)
parent1e7bac9
nixos/modules/virtualisation/virtualbox-image.nix+5
@@ -99,6 +99,11 @@ in {
9999 boot.growPartition = true;
100100 boot.loader.grub.device = "/dev/sda";
101101
102+ swap.swapDevices = {
103+ device = "/var/swap";
104+ size = 2048;
105+ };
106+
102107 virtualisation.virtualbox.guest.enable = true;
103108
104109 };