I’m using disko
to setup a machine with a LUKS partition like this:
luks = {
size = "100%";
content = {
type = "luks";
name = "CRYPT";
extraOpenArgs = [ ];
settings = {
keyFile = "/tmp/disk.key";
allowDiscards = true;
};
content = {
type = "zfs";
pool = "tank";
};
};
};
I’m then using nixos-anywhere
to run the installer and copy in the keyFile:
nix run github:numtide/nixos-anywhere -- \
--extra-files "$temp" \
--disk-encryption-keys /tmp/disk.key <(echo -n "password") \
--flake ".#${MACHINE}" "root@${IP}" \
--no-reboot
Nixos-anywhere’s installation succeeds and a secret is added to the LUKS partition but password
is not working to decrypt it. Any ideas whats going on?