From 28aad07d18b38da6c1e8a55a2ddf52736be53a4f Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Thu, 30 Nov 2023 05:46:47 +0000 Subject: [PATCH] Add a swapfile. We run out of memory way too often. Signed-off-by: Danila Fedorin --- hardware-configuration.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hardware-configuration.nix b/hardware-configuration.nix index d19f13c..4795d77 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -3,4 +3,10 @@ imports = [ "${modulesPath}/profiles/qemu-guest.nix" ]; boot.loader.grub.device = "/dev/vda"; fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; }; + swapDevices = [ + { + device = "/var/lib/swapfile"; + size = 2*1024; + } + ]; }