diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-06-08 17:11:30 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-06-10 16:18:26 +0530 |
| commit | 969a9a311d24548c6632ddcdc4f903ffa48c5ca6 (patch) | |
| tree | 9e508610c3e077647cc39ceb398a8226be8c21d0 /build.sh | |
| parent | 93179e7a79ca08464b9e443df41383b487bda7e8 (diff) | |
| download | homeserver-nixos-config-969a9a311d24548c6632ddcdc4f903ffa48c5ca6.tar.gz homeserver-nixos-config-969a9a311d24548c6632ddcdc4f903ffa48c5ca6.zip | |
Init commit with shit that does it
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..0d6376f --- /dev/null +++ b/build.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env sh +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'" +} + +cmd="$1"; shift; +case "$cmd" in + sync) config_sync ;; + *) echo "foo" && exit 1 ;; +esac + |
