Full Disk Encryption: Difference between revisions

imported>Zimbatm
No edit summary
imported>Zimbatm
add perf paragraph
Line 114: Line 114:
{
{
   swapDevices = [{device = "/swapfile"; size = 10000;}];
   swapDevices = [{device = "/swapfile"; size = 10000;}];
}
</syntaxhighlight>
== Perf test ==
<syntaxhighlight lang="bash">
# compare
nix-shell -p hdparm --run "hdparm -Tt /dev/mapper/cryptroot"
# with
nix-shell -p hdparm --run "hdparm -Tt /dev/sda1"
</syntaxhighlight>
I had to add a few modules to initrd to make it fast. Since cryptroot is opened really early on, all the AES descryption modules should already be made available. This obviously depends on the platform that you are on.
<syntaxhighlight lang="nix">
{
  boot.initrd.availableKernelModules = [
    "aes_x86_64"
    "aesni_intel"
    "cryptd"
  ];
}
}
</syntaxhighlight>
</syntaxhighlight>