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
19c46b4a2a
commit
7f10c9fca0
1 changed files with 7 additions and 2 deletions
|
|
@ -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..."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue