diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-05-15 20:00:21 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-05-15 20:00:21 +0200 |
commit | 76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952 (patch) | |
tree | 2ebed0a431186d2bdad9fd79c6b9b6410de405b2 /system-profiles/rebuild-machines/rebuild-machine.zsh | |
parent | 4ab2a5cb512cfdda47e67ed54a8f1f283c32999b (diff) | |
download | nixos-76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952.tar nixos-76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952.tar.gz nixos-76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952.tar.bz2 nixos-76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952.tar.xz nixos-76daf3ac0aa3399d7fcfbadc35c14ed2d0bbe952.zip |
rebuild-machines
Diffstat (limited to 'system-profiles/rebuild-machines/rebuild-machine.zsh')
-rw-r--r-- | system-profiles/rebuild-machines/rebuild-machine.zsh | 9 |
1 files changed, 9 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..80cc7a2f --- /dev/null +++ b/system-profiles/rebuild-machines/rebuild-machine.zsh | |||
@@ -0,0 +1,9 @@ | |||
1 | #!@zsh@/bin/zsh | ||
2 | |||
3 | set -o errexit | ||
4 | |||
5 | if [[ $(whoami) != "root" ]]; then | ||
6 | exec sudo -H -- $0 $@ | ||
7 | fi | ||
8 | |||
9 | exec nixos-rebuild --refresh --flake 'git+ssh://machines/nixos?ref=flakes#@hostName@' ${@:-switch} | ||