From d4a5d3c200d0afa7b2c4d167879fb1df27468148 Mon Sep 17 00:00:00 2001 From: Matthieu Morin Date: Sun, 9 Jun 2024 01:42:13 +0000 Subject: [PATCH] luks upd --- systems/jeroboam/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/systems/jeroboam/default.nix b/systems/jeroboam/default.nix index cd1e824..083aa43 100644 --- a/systems/jeroboam/default.nix +++ b/systems/jeroboam/default.nix @@ -70,10 +70,21 @@ initrd = { systemd.enable = true; # tpm2 unlock requires systemd initrd luks.devices."cryptroot" = { - allowDiscards = true; bypassWorkqueues = true; device = "/dev/nvme0n1p2"; crypttabExtraOpts = [ "tpm2-device=auto" ]; # tpm2 unlock + preLVM = true; + + # If using a USB or SD Card for decryption include the following. + allowDiscards = true; + keyFileSize = 4096; + # This is the disk id of your USB or SD Card. + # Get this by running `ls -l /dev/disk/by-id`, + # and copy the long string into the spot below. + keyFile = "/dev/disk/by-id/Hello"; + + # Use this if you want to fallback to the encryption password when the drive can't be found. HIGHLY RECCOMENDED!!!! + fallbackToPassword = true; }; }; resumeDevice = config.fileSystems."/swap".device;