unlock: Simplify
This commit is contained in:
parent
76e1ec00af
commit
8b9a469153
|
@ -156,12 +156,11 @@
|
|||
pkgs.writeShellScript "unlock-${hostname}" ''
|
||||
set -exo pipefail
|
||||
# opening luks fails if gpg-agent is not unlocked yet
|
||||
pass "devices/${hostname}/luks" >/dev/null
|
||||
ssh \
|
||||
pass "devices/${hostname}/luks" | ssh \
|
||||
${lib.optionalString unlockOverV4 "-4"} \
|
||||
-p 2222 \
|
||||
"root@${targetHost}" \
|
||||
"cat > /crypt-ramfs/passphrase" < <(pass "devices/${hostname}/luks")
|
||||
"cat > /crypt-ramfs/passphrase"
|
||||
'')
|
||||
self.nixosConfigurations);
|
||||
|
||||
|
|
Loading…
Reference in a new issue