nixfiles/data/drives/encryptedDrive.nix
2023-09-20 15:46:20 +01:00

26 lines
566 B
Nix

# This works with both UEFI and BIOS based systems
rec {
# Mountpoints
mountpoint = "/";
bootMountpoint = "/boot";
# Partition Labels
bootLabel = "nixboot";
unencryptedLabel = "nixos";
encryptedPartLabel = "nixos_encrypted";
# Partition Filesystems
unencryptedFSType = "ext4";
bootFSType = "vfat";
# Mapper Name
mapperName = "cryptroot";
# FS Paths
encryptedPath = "/dev/disk/by-partlabel/${encryptedPartLabel}";
decryptedPath = "/dev/mapper/${mapperName}";
# the /boot parition
bootPath = "/dev/disk/by-label/${bootLabel}";
}