Swap: Difference between revisions
m Fix typo in URL |
m Change GB to GiB and MB to MiB |
||
| Line 23: | Line 23: | ||
swapDevices = [{ | swapDevices = [{ | ||
device = "/var/lib/swapfile"; | device = "/var/lib/swapfile"; | ||
size = 16*1024; # 16 | size = 16*1024; # 16 GiB | ||
}]; | }]; | ||
</nowiki> | </nowiki> | ||
}} | }} | ||
This will create a 16GB swapfile at <code>/var/lib/swapfile</code>. The <code>size</code> value [https://search.nixos.org/options?show=swapDevices.*.size is specified in | This will create a 16GB swapfile at <code>/var/lib/swapfile</code>. The <code>size</code> value [https://search.nixos.org/options?show=swapDevices.*.size is specified in mebibytes]. This will cause a swap file to be generated and an entry to be set up in <code>/etc/fstab</code>. | ||
== Swap partition == | == Swap partition == | ||