Full Disk Encryption: Difference between revisions
imported>Zimbatm m fix formatting |
imported>Zimbatm No edit summary |
||
Line 90: | Line 90: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Now keep installing as usual, nixos-generate-config should detect the right partitioning. You should have something like this in your /etc/nixos/hardware-configuration.nix: | |||
<syntaxhighlight lang=" | |||
<syntaxhighlight lang="nix"> | |||
{ # cut | |||
fileSystems."/" = | |||
{ device = "/dev/disk/by-uuid/5e7458b3-dcd2-49c6-a330-e2c779e99b66"; | |||
fsType = "ext4"; | |||
}; | |||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/d2cb12f8-67e3-4725-86c3-0b5c7ebee3a6"; | |||
fileSystems."/boot" = | |||
{ device = "/dev/disk/by-uuid/863B-7B32"; | |||
fsType = "vfat"; | |||
}; | |||
swapDevices = [ ]; | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
To create a swap add the following in your /etc/nixos/configuration.nix: | |||
<syntaxhighlight lang="nix"> | |||
{ | |||
swapDevices = [{device = "/swapfile"; size = 10000;}]; | |||
} | |||
</syntaxhighlight> |