summaryrefslogtreecommitdiff
path: root/rebuild-system
blob: 8f116e3b3e07c8c78bb2041d891aec00bc04000f (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash

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

path=/etc/nixos

git -C $path pull && \
    git -C $path submodule update && \
    nixos-rebuild $@