From 25e72626f78ebe3c3621ecb841d1bf58a4fbd1b2 Mon Sep 17 00:00:00 2001 From: Lin Yinfeng Date: Fri, 4 Aug 2023 15:36:15 +0800 Subject: [PATCH] hosts/hkg0: add swapfile --- nixos/hosts/hkg0/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/hosts/hkg0/default.nix b/nixos/hosts/hkg0/default.nix index a835cb0b8..9669b2995 100644 --- a/nixos/hosts/hkg0/default.nix +++ b/nixos/hosts/hkg0/default.nix @@ -38,7 +38,13 @@ in { device = "/dev/vda1"; fsType = "ext4"; }; - swapDevices = [{device = "/dev/vda2";}]; + swapDevices = [ + {device = "/dev/vda2";} + { + device = "/swapfile"; + size = 2048; # 2 GiB + } + ]; } (lib.mkIf (!config.system.is-vm) {