fix remote-decrypt

This commit is contained in:
陈浩南 2023-10-02 14:20:21 +08:00
parent 68b94f7216
commit a0ef3198c2

View File

@ -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)))