mirror of
https://github.com/tuxdotrs/nixos-config.git
synced 2025-07-06 17:56:35 +05:30
17 lines
287 B
Bash
Executable File
17 lines
287 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 --use-substitutes $@
|
|
done
|