Gen 277: rewrote zshell.nix, split nixswitch into two separate functions
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -93,22 +93,13 @@ nixcommit() {
|
||||
gen=$((gen + 1))
|
||||
|
||||
git diff --quiet
|
||||
if [ $? -eq 1 ]; then
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Nothing to commit"
|
||||
return
|
||||
fi
|
||||
git add .
|
||||
git commit -m "Gen $gen: $@"
|
||||
git push
|
||||
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
|
||||
}
|
||||
|
||||
nixswitch() {
|
||||
|
||||
Reference in New Issue
Block a user