From f5208de999e056476936f49272f9a2403e6f830f Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 16 Jun 2023 19:32:12 -0400 Subject: [PATCH] add a quick-switch script --- quick-switch.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 quick-switch.sh diff --git a/quick-switch.sh b/quick-switch.sh new file mode 100755 index 0000000..5448b07 --- /dev/null +++ b/quick-switch.sh @@ -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 +