summaryrefslogtreecommitdiff
path: root/system-profiles/rebuild-machines/rebuild-machine.zsh
blob: 80cc7a2fef995ba6643fb439bd97236f64e2a22d (plain)
1
2
3
4
5
6
7
8
9
#!@zsh@/bin/zsh

set -o errexit

if [[ $(whoami) != "root" ]]; then
    exec sudo -H -- $0 $@
fi

exec nixos-rebuild --refresh --flake 'git+ssh://machines/nixos?ref=flakes#@hostName@' ${@:-switch}