diff --git a/deploy-host b/deploy-host index 0fccb9f..9b90456 100755 --- a/deploy-host +++ b/deploy-host @@ -2,7 +2,7 @@ set -o errexit set -o errtrace -set -o nounset +# set -o nounset debug=echo @@ -12,7 +12,7 @@ then exit 1 fi -nixanywhere=~/src/nixos/nixos-anywhere-examples +nixanywhere=~/src/nixos/duckland/nixos-anywhere nixsrc=~/src/nixos/duckland ip="${1}" host="${2}" @@ -23,12 +23,13 @@ then exit 1 fi -cd "${nixanywhere}" +${debug} cd "${nixanywhere}" ${debug} ssh-keygen -R "${ip}" ${debug} nix run github:nix-community/nixos-anywhere -- --flake .#${host} root@"${ip}" -cd "${nixsrc}" +${debug} cd "${nixsrc}" ${debug} ssh-keygen -R "${ip}" ${debug} ssh root@"${ip}" nixos-generate-config ${debug} scp root@"${ip}":/etc/nixos/hardware-configuration.nix hosts/${host}/hardware-configuration.nix ${debug} git add hosts/${host}/hardware-configuration.nix ${debug} nixos-rebuild switch --flake .#${host} --target-host "root@"${ip}"" +${debug} rsync -av ~/.ssh ~/bin don@"${ip}":