diff options
Diffstat (limited to 'system-profiles/rebuild-machines/rebuild-machine.zsh')
-rw-r--r-- | system-profiles/rebuild-machines/rebuild-machine.zsh | 7 |
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 | ||
3 | if [[ $(whoami) != "root" ]]; then | 3 | if [[ $(@coreutils@/bin/whoami) != "root" ]]; then |
4 | exec sudo -H -- $0 $@ | 4 | exec @wrapperDir@/sudo -H -- @out@/bin/@scriptName@ $@ |
5 | fi | 5 | fi |
6 | 6 | ||
7 | exec -- nixos-rebuild --refresh --flake 'git+ssh://machines/nixos?ref=flakes#@hostName@' ${@:-switch} | 7 | export NIX_SSHOPTS="-F @sshConfig@" GIT_SSH_COMMAND="@openssh@/bin/ssh -F @sshConfig@" |
8 | exec -- @nixosRebuild@/bin/nixos-rebuild --refresh --flake '@flake@' ${@:-switch} | ||