diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..1254478 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +export NIX_SSHOPTS="-A" + +build_remote=false + +hosts="$1" +shift + +if [ -z "$hosts" ]; then + echo "No hosts to deploy" + exit 2 +fi + +for host in ${hosts//,/ }; do + nixos-rebuild --flake .\#$host switch --target-host $host --use-remote-sudo --use-substitutes $@ +done