diff options
-rw-r--r-- | system-profiles/rebuild-machines/rebuild-machine.zsh | 6 |
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 | |||
3 | set -o errexit | ||
4 | 2 | ||
5 | if [[ $(whoami) != "root" ]]; then | 3 | if [[ $(whoami) != "root" ]]; then |
6 | exec sudo -H -- $0 $@ | 4 | exec sudo -H -- $0 $@ |
7 | fi | 5 | fi |
8 | 6 | ||
9 | exec nixos-rebuild --refresh --flake 'git+ssh://machines/nixos?ref=flakes#@hostName@' ${@:-switch} | 7 | exec -- nixos-rebuild --refresh --flake 'git+ssh://machines/nixos?ref=flakes#@hostName@' ${@:-switch} |