From e3239c6b8da1d0c29c4fd579b2fdf0eae01ef846 Mon Sep 17 00:00:00 2001 From: death916 Date: Wed, 11 Mar 2026 09:24:32 -0700 Subject: [PATCH] nh-push --- scripts/nh-push | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/nh-push b/scripts/nh-push index 28c6ead..270eeda 100755 --- a/scripts/nh-push +++ b/scripts/nh-push @@ -26,12 +26,13 @@ fi # --- NixOS Build --- echo "Building NixOS configuration..." # 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 - echo "Running: nh os switch $REPO_ROOT" - nh os switch "$REPO_ROOT" + CURRENT_HOSTNAME=$(hostname) + echo "Running: nh os switch \"$REPO_ROOT\" -H \"$CURRENT_HOSTNAME\"" + nh os switch "$REPO_ROOT" -H "$CURRENT_HOSTNAME" else - echo "Running: nh os switch $REPO_ROOT -H $@" + echo "Running: nh os switch \"$REPO_ROOT\" -H \"$@\"" nh os switch "$REPO_ROOT" -H "$@" fi