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.zsh7
1 files changed, 4 insertions, 3 deletions
diff --git a/system-profiles/rebuild-machines/rebuild-machine.zsh b/system-profiles/rebuild-machines/rebuild-machine.zsh
index 59df8999..e9e1655f 100644
--- a/system-profiles/rebuild-machines/rebuild-machine.zsh
+++ b/system-profiles/rebuild-machines/rebuild-machine.zsh
@@ -1,7 +1,8 @@
1#!@zsh@/bin/zsh -e 1#!@zsh@/bin/zsh -e
2 2
3if [[ $(whoami) != "root" ]]; then 3if [[ $(@coreutils@/bin/whoami) != "root" ]]; then
4 exec sudo -H -- $0 $@ 4 exec @wrapperDir@/sudo -H -- @out@/bin/@scriptName@ $@
5fi 5fi
6 6
7exec -- nixos-rebuild --refresh --flake 'git+ssh://machines/nixos?ref=flakes#@hostName@' ${@:-switch} 7export NIX_SSHOPTS="-F @sshConfig@" GIT_SSH_COMMAND="@openssh@/bin/ssh -F @sshConfig@"
8exec -- @nixosRebuild@/bin/nixos-rebuild --refresh --flake '@flake@' ${@:-switch}