diff options
Diffstat (limited to 'system-profiles/rebuild-machines/rebuild-machine.zsh')
-rw-r--r-- | system-profiles/rebuild-machines/rebuild-machine.zsh | 10 |
1 files changed, 10 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..6420a417 --- /dev/null +++ b/system-profiles/rebuild-machines/rebuild-machine.zsh | |||
@@ -0,0 +1,10 @@ | |||
1 | #!@zsh@/bin/zsh -e | ||
2 | |||
3 | if [[ $(@coreutils@/bin/whoami) != "root" ]]; then | ||
4 | exec @wrapperDir@/sudo -H -- @out@/bin/@scriptName@ $@ | ||
5 | fi | ||
6 | |||
7 | export NIX_SSHOPTS="-F @sshConfig@" | ||
8 | export GIT_SSH_COMMAND="@openssh@/bin/ssh -F @sshConfig@" | ||
9 | export GIT_CONFIG_COUNT=0 GIT_CONFIG_KEY_0="init.defaultBranch" GIT_CONFIG_VALUE_0=main | ||
10 | exec -- @nixosRebuild@/bin/nixos-rebuild --refresh --flake '@flake@' ${@:-switch} | ||