diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-06-06 18:46:06 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-06-06 18:46:06 +0200 |
commit | a57f5e6e4b655abf21430053db013d9a646b5bf8 (patch) | |
tree | 9b425cc69175c66f2956502b448b579fb9687d50 /system-profiles/rebuild-machines/rebuild-machine.zsh | |
parent | 190823db2caf179ed94f55a8ce70d7f2879c2ab6 (diff) | |
download | nixos-a57f5e6e4b655abf21430053db013d9a646b5bf8.tar nixos-a57f5e6e4b655abf21430053db013d9a646b5bf8.tar.gz nixos-a57f5e6e4b655abf21430053db013d9a646b5bf8.tar.bz2 nixos-a57f5e6e4b655abf21430053db013d9a646b5bf8.tar.xz nixos-a57f5e6e4b655abf21430053db013d9a646b5bf8.zip |
rebuild-machines: cleanup script
Diffstat (limited to 'system-profiles/rebuild-machines/rebuild-machine.zsh')
-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} |