From 7f10c9fca0240b8c9d5f94e4a500669f79f8bc73 Mon Sep 17 00:00:00 2001 From: death916 Date: Wed, 11 Mar 2026 09:15:54 -0700 Subject: [PATCH] nh-push --- scripts/nh-push | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/nh-push b/scripts/nh-push index a74682d..be1c2ab 100755 --- a/scripts/nh-push +++ b/scripts/nh-push @@ -25,8 +25,13 @@ fi # --- NixOS Build --- echo "Building NixOS configuration..." -# Use -H to specify the hostname and provide the flake directory path. -nh os switch "$REPO_ROOT" -H "$@" +# If an argument is provided, use it as the hostname with -H. +# Otherwise, let nh autodetect the hostname. +if [ -z "$1" ]; then + nh os switch "$REPO_ROOT" +else + nh os switch "$REPO_ROOT" -H "$@" +fi # --- Git Push on Success --- echo "NixOS rebuild successful. Pushing to remote..."