boot.initrd.luks.devices."NIXCRYPT".device = "/dev/disk/by-uuid/f5518dc7-cad7-4bd8-b1af-83f440a2a62f";
boot.initrd.luks.devices."NIXCRYPT".bypassWorkqueues = true; # Only recommended for NVME SSDs
boot.initrd.luks.devices."NIXCRYPT".allowDiscards = true; # Important for SSD lifespan if no hardcore security requirement
fileSystems."/" = {
# Use of /dev/mapper to prevent the timeout of 90 seconds when entering the lukse passphrase.
device = "/dev/mapper/NIXCRYPT";
fsType = "ext4";
};
It’s because you added them to fileSystems, which is effectively equivalent to fstab, not crypttab. @DocBrown101 has it right; though it’s worth noting that the reason these are nixos options and not an arbitrary list of crypttab options is because nixos’s scripted initrd doesn’t use crypttab; it just implements features like these manually. But boot.initrd.systemd.enable enables the systemd initrd which does use crypttab and those options will be converted into boot.initrd.luks.devices.<name>.crypttabExtraOpts options which is just an arbitrary list of crypttab options. (Also the 90 second timeout that @DocBrown101’s code refers to in the comment only happens with systemd initrd)