summaryrefslogtreecommitdiff
path: root/system-profiles/rebuild-machines/rebuild-machine.zsh
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-06-06 21:25:39 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2021-06-06 21:25:39 +0200
commitbff6acc5b58eec5265182dce7b905d5a5b98976a (patch)
tree22138607238197c3eb47793e70de6220262a7c9f /system-profiles/rebuild-machines/rebuild-machine.zsh
parenta57f5e6e4b655abf21430053db013d9a646b5bf8 (diff)
downloadnixos-bff6acc5b58eec5265182dce7b905d5a5b98976a.tar
nixos-bff6acc5b58eec5265182dce7b905d5a5b98976a.tar.gz
nixos-bff6acc5b58eec5265182dce7b905d5a5b98976a.tar.bz2
nixos-bff6acc5b58eec5265182dce7b905d5a5b98976a.tar.xz
nixos-bff6acc5b58eec5265182dce7b905d5a5b98976a.zip
rebuild-machines: major cleanup
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}