1
0
Fork 0
nixos-config/nixos/roles/boot-key.nix
2020-09-16 19:32:23 +02:00

15 lines
389 B
Nix

{ lib, config, ... }:
let secretsFile = "/var/lib/luks-secret/key";
in {
boot = {
initrd = {
luks.devices."nixos" = {
fallbackToPassword = true;
keyFile = secretsFile;
};
# copy the secret into the additional initramfs. `null` means same path
secrets."${secretsFile}" = null;
};
loader.supportsInitrdSecrets = lib.mkForce true;
};
}