add a quick-switch script

This commit is contained in:
alex 2023-06-16 19:32:12 -04:00
parent 539c18ad41
commit f5208de999
1 changed files with 11 additions and 0 deletions

11
quick-switch.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
if [ -z "$(git status --porcelain)" ]
then
git push
sudo nixos-rebuild switch --flake "git+https://git.atauno.com/atau/nixos-config.git"
else
echo "Git working directory is unclean, please commit changes"
exit 1
fi