Swap: Difference between revisions
imported>Yuu No edit summary |
imported>Yuu No edit summary |
||
| Line 3: | Line 3: | ||
=== Disable swap === | === Disable swap === | ||
To remove all swap devices from NixOS, set | To remove all swap devices from NixOS, set the following to remove the swap partition or file from being included in <code>/etc/fstab</code>. | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
swapDevices = lib.mkForce [ ]; | swapDevices = lib.mkForce [ ]; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
If you are using GPT partitioning tables, <code>systemd-gpt-auto-generator(8)</code> will still mount your swap partition automatically. You must therefore turn on attribute 63 on your partition in the partition table. This can be done with gptfdisk or similar: | If you are using GPT partitioning tables, <code>systemd-gpt-auto-generator(8)</code> will still mount your swap partition automatically. You must therefore turn on attribute 63 on your partition in the partition table. This can be done with gptfdisk or similar: | ||