diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-06-06 21:25:39 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-06-06 21:25:39 +0200 |
commit | bff6acc5b58eec5265182dce7b905d5a5b98976a (patch) | |
tree | 22138607238197c3eb47793e70de6220262a7c9f /system-profiles/rebuild-machines/rebuild-machine.zsh | |
parent | a57f5e6e4b655abf21430053db013d9a646b5bf8 (diff) | |
download | nixos-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.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} | ||