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