automount encrypted SD card

This commit is contained in:
Daniel Langbein 2023-08-18 19:18:47 +02:00
parent 9c66ecb7a7
commit 0736418e60
2 changed files with 19 additions and 2 deletions

View File

@ -71,3 +71,13 @@ There are two (?) theses about Nix. One is https://edolstra.github.io/pubs/phd-t
## TODOS
* FDE remote SSH unlock: https://nixos.wiki/wiki/Remote_LUKS_Unlocking
## Automount Encrypted Drive
* Generate and add keyfile to LUKS device
* luksOpen and mount drive, e.g. to `/mnt/data1`
* Re-generate hardware configuration:
```shell
sudo nixos-generate-config --dir yodaTux
```

View File

@ -8,7 +8,7 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "uas" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -26,6 +26,13 @@
fsType = "vfat";
};
fileSystems."/mnt/512gb" =
{ device = "/dev/disk/by-uuid/c27f48d4-b39c-46a4-a27a-71aa6e4113e3";
fsType = "ext4";
};
boot.initrd.luks.devices."512gb".device = "/dev/disk/by-uuid/03d4ac28-2c81-463e-b615-fb623d40b6fa";
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking