summaryrefslogtreecommitdiff
path: root/rebuild-system
blob: d17558967b07c3ac269fe8fea9387ffa696578bc (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 --recurse-submodules
exec nixos-rebuild $@