From c21d2b97a70486e2ec616c1416707f93763149ec Mon Sep 17 00:00:00 2001
From: lilly <li@lly.sh>
Date: Fri, 21 Feb 2025 18:49:03 +0100
Subject: [PATCH] make switch_remote.sh usabl

---
 switch_remote.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/switch_remote.sh b/switch_remote.sh
index af27fb2..75f7374 100755
--- a/switch_remote.sh
+++ b/switch_remote.sh
@@ -4,9 +4,13 @@ set -euo pipefail
 
 ACTION=$1
 HOST=$2
+CONFIG=$3
 
+set -x
 exec nixos-rebuild $ACTION \
   --use-substitutes \
   --no-build-nix \
   --use-remote-sudo \
-  --flake ".#$HOST" \
+  --build-host $HOST \
+  --target-host $HOST \
+  --flake ".#${CONFIG}.noc.eh22.intern"