Skip to content

Commit

Permalink
hosts/hkg0: add swapfile
Browse files Browse the repository at this point in the history
  • Loading branch information
linyinfeng committed Aug 4, 2023
1 parent 3ce2cb3 commit 25e7262
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nixos/hosts/hkg0/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 25e7262

Please sign in to comment.