fix straylight /home LUKS: use initrd instead of crypttab

Replace fragile environment.etc.crypttab.text with
boot.initrd.luks.devices for the second SSD, matching
the pattern used for the root drive.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 00:12:14 -07:00
parent a8e43936cf
commit 453947ac7b

View File

@@ -30,16 +30,15 @@
options = [ "fmask=0077" "dmask=0077" ];
};
boot.initrd.luks.devices."home-crypt" = {
device = "/dev/disk/by-uuid/edfdcdf4-083a-4826-a1f8-9670545e0bc5";
};
fileSystems."/home" = {
device = "/dev/mapper/home-crypt";
fsType = "ext4";
options = [ "defaults" ];
};
environment.etc.crypttab.text = ''
home-crypt UUID=edfdcdf4-083a-4826-a1f8-9670545e0bc5 /etc/secrets/home.key luks
'';
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";