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