NixOS Full Disk Encryption
Yesterday, I shared a short article regarding NixOS.
Over the next couple of weeks, I plan to share my experience using the operating system, specifically with my Framework Laptop 13 (AMD Ryzen).
Unlike Fedora and Pop_OS!, the NixOS GUI installer does not include a default option for full disk encryption. Therefore, similar to the process I outlined for Manjaro, the encrypted partitions must be manually created.
Thankfully, this is a relatively easy process, as outlined below.
-
Download the NixOS Graphical ISO image, specifically the GNOME 64-bit Intel/AMD. NOTE: This does not force the use of GNOME. Any supported desktop environment can be selected as part of the installation.
-
Ensure Secure Boot is disabled on the target system and boot from the USB.
-
Connect NixOS to the Internet (Wired or Wireless). Restart the NixOS installer application if the Internet connection is not automatically detected.
-
Proceed through the installation wizard, until partitioning.
-
Select “Manual Partitioning” and click “Next”.
-
Delete any existing partitions from the target drive. NOTE: All previous data will be lost.
-
Click “Create Partition Table” and select “GUID Partition Table (GPT)”.
-
Click “Create” to create a new partition using the following configuration. Repeat this step until all three partitions have been created.
Partition One: Boot
- Size: 512 MiB
- Partition Type: GPT
- File System: fat32
- Encrypt: Not Checked
- Mount Point: /boot
- Flags: boot
Partition Two: Swap
- Size: 8192 MiB (Minimum)
- Partition Type: GPT
- File System: linuxswap
- Encrypt: Checked (Enter Username/Password)
- Mount Point:
- Flags: swap
Partition Three: Root
- Size: Remaining Drive Space
- Partition Type: GPT
- File System: btrfs
- Encrypt: Checked (Enter Username/Password)
- Mount Point: /
- Flags:
That’s it! Click “Next” and complete the installation process. You may receive a warning regarding the non-encrypted boot partition, this can be ignored.
At boot, the system will prompt for the encryption password, before launching NixOS (where you will be prompted for your operating system password).