From 68ac3ddfbcc251d1cdba43742a9e2c28a73cc752 Mon Sep 17 00:00:00 2001 From: encode42 Date: Wed, 19 Nov 2025 15:33:19 -0500 Subject: [PATCH] Switch decryption's boot device (and use LUKS) --- hosts/decryption/disks.nix | 58 ++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/hosts/decryption/disks.nix b/hosts/decryption/disks.nix index 2c2f651..e256e9a 100644 --- a/hosts/decryption/disks.nix +++ b/hosts/decryption/disks.nix @@ -3,14 +3,14 @@ disk = { main = { type = "disk"; - device = "/dev/disk/by-id/nvme-Samsung_SSD_980_1TB_S64ANS0T409404F"; + device = "/dev/disk/by-id/nvme-WD_BLACK_SN7100_1TB_251356803910"; content = { type = "gpt"; partitions = { ESP = { - end = "500M"; + size = "512M"; type = "EF00"; content = { @@ -20,20 +20,62 @@ mountpoint = "/boot"; }; }; - root = { - name = "root"; - end = "-0"; + + luks = { + size = "100%"; content = { - type = "filesystem"; + name = "cryptroot"; + type = "luks"; + + extraOpenArgs = [ + "--allow-discards" + "--perf-no_read_workqueue" + "--perf-no_write_workqueue" + ]; + + settings = { + crypttabExtraOpts = [ + "tpm-device=auto" + "token-timeout=10" + ]; + }; - format = "xfs"; - mountpoint = "/"; + content = { + type = "lvm_pv"; + vg = "vg0"; + }; }; }; }; }; }; }; + + lvm_vg.vg0 = { + type = "lvm_vg"; + + lvs = { + root = { + name = "root"; + size = "100%FREE"; + + content = { + type = "filesystem"; + + format = "xfs"; + mountpoint = "/"; + }; + }; + + swap = { + size = "32G"; + + content = { + type = "swap"; + }; + }; + }; + }; }; } -- 2.51.2