Swap: Difference between revisions

imported>Axelbdt
Add method to add swapfile
imported>Winny
Configuration: Add section on random encryption key at boot. TODO: test this.
Line 30: Line 30:
<enter>
<enter>
w
w
</syntaxhighlight>
=== Encrypt Swap with random key ===
Swap can be automatically encrypted with a new key on every boot.  This can be used to simplify certain disk layouts, such as securing a swap file on a filesystem partition without  an encryption container (such as LUKS).
<syntaxhighlight lang="nix">
swapDevices = [ {
    device = "/dev/sdXY";
    randomEncryption.enable = true;
  } ];
</syntaxhighlight>
</syntaxhighlight>