Files
tnvim/deploy.sh
2024-08-30 14:44:55 +05:30

17 lines
313 B
Bash
Executable File

#!/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 --log-format internal-json -v |& nom --json $@
done