summaryrefslogtreecommitdiff
path: root/system-profiles/rebuild-machines
diff options
context:
space:
mode:
Diffstat (limited to 'system-profiles/rebuild-machines')
-rw-r--r--system-profiles/rebuild-machines/rebuild-machine.zsh6
1 files changed, 2 insertions, 4 deletions
diff --git a/system-profiles/rebuild-machines/rebuild-machine.zsh b/system-profiles/rebuild-machines/rebuild-machine.zsh
index 80cc7a2f..59df8999 100644
--- a/system-profiles/rebuild-machines/rebuild-machine.zsh
+++ b/system-profiles/rebuild-machines/rebuild-machine.zsh
@@ -1,9 +1,7 @@
1#!@zsh@/bin/zsh 1#!@zsh@/bin/zsh -e
2
3set -o errexit
4 2
5if [[ $(whoami) != "root" ]]; then 3if [[ $(whoami) != "root" ]]; then
6 exec sudo -H -- $0 $@ 4 exec sudo -H -- $0 $@
7fi 5fi
8 6
9exec nixos-rebuild --refresh --flake 'git+ssh://machines/nixos?ref=flakes#@hostName@' ${@:-switch} 7exec -- nixos-rebuild --refresh --flake 'git+ssh://machines/nixos?ref=flakes#@hostName@' ${@:-switch}