aboutsummaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorKumar Damani <me@kumardamani.net>2026-08-02 01:42:14 +0000
committerKumar Damani <me@kumardamani.net>2026-08-02 01:42:14 +0000
commit3e139a0e702513f6e1145158b2695b43c8251b92 (patch)
tree8f4840a86962b86eaf9eca70feab3a1124f504eb /nix
parent02926f70770ceb90cf382da2b54f888ba969f423 (diff)
fixed deploy scripts path resolution
Diffstat (limited to 'nix')
-rwxr-xr-xnix/deploy.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/nix/deploy.sh b/nix/deploy.sh
index d3ad649..4459aab 100755
--- a/nix/deploy.sh
+++ b/nix/deploy.sh
@@ -1,6 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
+# Resolve paths relative to this script, not the caller's CWD
+cd -- "$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")"
+
HOST="$1"
FLAKE=".#${HOST}"
KEY_DIR="./host-keys/${HOST}"