mirror of
https://github.com/tuxdotrs/tawm.git
synced 2025-07-06 13:06:35 +05:30
add deploy script to build host remotely
This commit is contained in:
16
deploy.sh
Executable file
16
deploy.sh
Executable file
@ -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
|
Reference in New Issue
Block a user