aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbuild.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index 0d6376f..0d8d65b 100755
--- a/build.sh
+++ b/build.sh
@@ -4,14 +4,17 @@ set -euo pipefail
SSH_TARGET="bacchus@192.168.0.117"
config_sync() {
- sshpass -p password rsync -r "$SSH_TARGET:~/nixos/flake.lock" .
- sshpass -p password rsync -r . "$SSH_TARGET:~/nixos"
- # sshpass -p password ssh "$SSH_TARGET" sh -c "nixos-rebuild build --flake 'path:/home/bacchus/nixos#bacchus'"
+ rsync -r "$SSH_TARGET:~/nixos/flake.lock" .
+ rsync -r . "$SSH_TARGET:~/nixos"
+ # ssh "$SSH_TARGET" sh -c "nixos-rebuild build --flake 'path:/home/bacchus/nixos#bacchus'"
}
+run_ssh() { ssh "$SSH_TARGET" "$@"; }
+
cmd="$1"; shift;
case "$cmd" in
sync) config_sync ;;
+ run) run_ssh "$@" ;;
*) echo "foo" && exit 1 ;;
esac