diff --git a/nixos-infect b/nixos-infect index a4f6fc5..c16a548 100755 --- a/nixos-infect +++ b/nixos-infect @@ -30,9 +30,11 @@ readonly NIX_OPTS=(--extra-experimental-features "nix-command flakes") DoNetConf= genOptionalSsh() { - [ -n "${SSH_AUTHORIZED_KEY}" ] && cat << EOF + if [ -n "${SSH_AUTHORIZED_KEY}" ]; then + cat << EOF "ssh": { "rootKeys": [ "${SSH_AUTHORIZED_KEY}" ] }, EOF + fi } # TODO receive disk device path from outside @@ -528,8 +530,6 @@ set -o xtrace shopt -s inherit_errexit trap 'echo ${LINENO}: "$BASH_COMMAND"; exit 1' ERR -genNetworkingConf - # digitalocean requires detailed network config to be generated [ "$PROVIDER" == "digitalocean" ] && DoNetConf="y"