nixos-config/quick-switch.sh

12 lines
246 B
Bash
Raw Normal View History

2023-06-16 23:32:12 +00:00
#!/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