mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
modularize configs
This commit is contained in:
parent
bc5649390f
commit
f4565fcd86
16 changed files with 1045 additions and 651 deletions
20
scripts/nh-push
Executable file
20
scripts/nh-push
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# A wrapper for 'nh' that runs 'git push' on success.
|
||||
|
||||
# Exit immediately if a command exits with a non-zero status.
|
||||
set -e
|
||||
|
||||
# Run the 'nh' command with all arguments passed to the script.
|
||||
# The flake path is hardcoded for convenience.
|
||||
nh os switch "/home/death916/nixconfig#$@"
|
||||
|
||||
# If the above command was successful, proceed to the next lines.
|
||||
echo "NixOS rebuild successful. Pushing to remote..."
|
||||
|
||||
# Push the configuration to the git remote.
|
||||
git -C /home/death916/nixconfig push
|
||||
|
||||
echo "Push complete."
|
||||
Loading…
Add table
Add a link
Reference in a new issue