summaryrefslogtreecommitdiff
path: root/rebuild-system
blob: cd99ae5f43df0a403fc3586a0758ff025c62574f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!@zsh@/bin/zsh

set -o errexit

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

configPath=$(nix-instantiate --eval --expr '<nixos-config>')

@git@/bin/git -C ${configPath:h} pull
nixos-rebuild $@