mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
nh-push
This commit is contained in:
parent
005d94848e
commit
e3239c6b8d
1 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue