summaryrefslogtreecommitdiff
path: root/rebuild-system
diff options
context:
space:
mode:
Diffstat (limited to 'rebuild-system')
-rw-r--r--rebuild-system11
1 files changed, 11 insertions, 0 deletions
diff --git a/rebuild-system b/rebuild-system
new file mode 100644
index 0000000..8f116e3
--- /dev/null
+++ b/rebuild-system
@@ -0,0 +1,11 @@
1#!/usr/bin/env bash
2
3if [[ "$USER" != "root" ]]; then
4 exec sudo -- $0 $@
5fi
6
7path=/etc/nixos
8
9git -C $path pull && \
10 git -C $path submodule update && \
11 nixos-rebuild $@