From a0ef3198c21bff569ff1cb0bb6b0a83d590018b8 Mon Sep 17 00:00:00 2001 From: chn Date: Mon, 2 Oct 2023 14:20:21 +0800 Subject: [PATCH] fix remote-decrypt --- modules/users/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/users/default.nix b/modules/users/default.nix index 24de0d2f..c78b34a4 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -170,7 +170,7 @@ inputs: "decrypt-${system.name}() {" " key=$(${cat} ${system.value.keyFile} | ${gpg} --decrypt)" (builtins.concatStringsSep "\n" (builtins.map - (device: " ${ssh} root@initrd.${system.name}.chn.moe cryptsetup luksOpen " + (device: " echo $key | ${ssh} root@initrd.${system.name}.chn.moe cryptsetup luksOpen " + (if device.value.ssd then "--allow-discards " else "") + "${device.name} ${device.value.mapper} -") (inputs.localLib.attrsToList system.value.devices)))