This commit is contained in:
death916 2026-03-11 09:24:32 -07:00
parent 005d94848e
commit e3239c6b8d

View file

@ -26,12 +26,13 @@ fi
# --- NixOS Build --- # --- NixOS Build ---
echo "Building NixOS configuration..." echo "Building NixOS configuration..."
# If an argument is provided, use it as the hostname with -H. # If an argument is provided, use it as the hostname with -H.
# Otherwise, let nh autodetect the hostname. # Otherwise, resolve the current hostname and use it.
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "Running: nh os switch $REPO_ROOT" CURRENT_HOSTNAME=$(hostname)
nh os switch "$REPO_ROOT" echo "Running: nh os switch \"$REPO_ROOT\" -H \"$CURRENT_HOSTNAME\""
nh os switch "$REPO_ROOT" -H "$CURRENT_HOSTNAME"
else else
echo "Running: nh os switch $REPO_ROOT -H $@" echo "Running: nh os switch \"$REPO_ROOT\" -H \"$@\""
nh os switch "$REPO_ROOT" -H "$@" nh os switch "$REPO_ROOT" -H "$@"
fi fi