aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh17
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
+