diff --git a/nixos-infect b/nixos-infect index 30c73bb..047f603 100644 --- a/nixos-infect +++ b/nixos-infect @@ -21,6 +21,7 @@ makeConf() { for trypath in /root/.ssh/authorized_keys /home/$SUDO_USER/.ssh/authorized_keys $HOME/.ssh/authorized_keys; do [[ -r "$trypath" ]] \ && keys=$(sed -E 's/^.*((ssh|ecdsa)-[^[:space:]]+)[[:space:]]+([^[:space:]]+)([[:space:]]*.*)$/\1 \3\4/' "$trypath") \ + && [[ ! -z "$keys" ]] \ && break done local network_import=""