Gen 277: rewrote zshell.nix, split nixswitch into two separate functions

This commit is contained in:
pagedMov
2024-10-10 18:28:26 -04:00
parent 3d2fd69704
commit 53bc8f2390
3 changed files with 16 additions and 15 deletions

View File

@@ -12,3 +12,9 @@
: 1728597285:0;zsr
: 1728598374:0;typeset -f cd
: 1728598390:0;cd ~/dots
: 1728599232:0;nvim zshell.nix
: 1728599235:0;zrc
: 1728599261:0;nixswitch
: 1728599299:0;nixcommit "rewrote zshell.nix, split nixswitch into two separate functions"
: 1728599303:0;zsr
: 1728599304:0;nixcommit "rewrote zshell.nix, split nixswitch into two separate functions"

View File

@@ -45,3 +45,7 @@
: 1728599083:0;nixswitch
: 1728599116:0;zsr
: 1728599118:0;nixcommit
: 1728599131:0;nvim zshell.nix
: 1728599192:0;nixswitch
: 1728599212:0;zsr
: 1728599222:0;nixcommit "rewrote zshell.nix"

View File

@@ -93,22 +93,13 @@ nixcommit() {
gen=$((gen + 1))
git diff --quiet
if [ $? -eq 1 ]; then
git add .
git commit -m "Gen $gen: $@"
git push
if [ $? -eq 0 ]; then
echo "Nothing to commit"
return
fi
read -p "Rebuild? y/n" confirm
if [ confirm = "y" ]; then
sudo nixos-rebuild switch --flake "$HOME/sysflakes#glasshouse"
if [ $? -eq 0 ]; then
s_check && (aplay ~/sound/sys/update.wav > /dev/null 2>&1 &)
else
s_check && (aplay ~/sound/sys/error.wav > /dev/null 2>&1 &)
fi
fi
builtin cd $OLDPWD
git add .
git commit -m "Gen $gen: $@"
git push
}
nixswitch() {