summaryrefslogtreecommitdiff
path: root/system-profiles/rebuild-machines/rebuild-machine.zsh
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-05-15 20:00:21 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2021-05-15 20:00:21 +0200
commit76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952 (patch)
tree2ebed0a431186d2bdad9fd79c6b9b6410de405b2 /system-profiles/rebuild-machines/rebuild-machine.zsh
parent4ab2a5cb512cfdda47e67ed54a8f1f283c32999b (diff)
downloadnixos-76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952.tar
nixos-76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952.tar.gz
nixos-76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952.tar.bz2
nixos-76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952.tar.xz
nixos-76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952.zip
rebuild-machines
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}