diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-06-08 21:05:21 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-06-10 16:18:26 +0530 |
| commit | 38ccadbc876ab9ae4f27d3e84a31f57bee10af3b (patch) | |
| tree | 69ea2d116f6a0b621f762cc94d86b15bba11e448 /build.sh | |
| parent | 7a8a09cdc21939fc2e6bc2c762e9b89cf87feb91 (diff) | |
| download | homeserver-nixos-config-38ccadbc876ab9ae4f27d3e84a31f57bee10af3b.tar.gz homeserver-nixos-config-38ccadbc876ab9ae4f27d3e84a31f57bee10af3b.zip | |
Switch to ssh key
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 |
