shell/unlock: Make unlock work if agent is locked
This commit is contained in:
parent
27285a098f
commit
16c710d4a5
|
@ -34,6 +34,8 @@ let
|
|||
set -eo pipefail
|
||||
machine="$1"
|
||||
hostname="$(nix-instantiate --eval --json machines -A "$1".target | ${pkgs.jq}/bin/jq -r . | cut -d@ -f2)"
|
||||
# opening luks fails if gpg-agent is not unlocked yet
|
||||
pass "devices/$machine/luks" >/dev/null
|
||||
ssh \
|
||||
-oStrictHostKeyChecking=no \
|
||||
-oGlobalKnownHostsFile=<(echo "[$hostname]:2222 ssh-ed25519 $(ssh-keygen -l -f <(ssh-keygen -y -f<(pass "nixos/machines/$machine/initrd-ssh-host-key")) | cut -d' ' -f2)") \
|
||||
|
|
Loading…
Reference in a new issue