summaryrefslogtreecommitdiff
path: root/rebuild-system
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-07-16 19:44:44 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-07-16 19:44:44 +0200
commit885af08edef3eede81101d4303e3a025dc078449 (patch)
tree2f5460b5cf387fec5c92f77afd07c32ed4bd265b /rebuild-system
parent5ffaa3126e1a35309a09d5bd356dbe363de91d88 (diff)
downloadutils-885af08edef3eede81101d4303e3a025dc078449.tar
utils-885af08edef3eede81101d4303e3a025dc078449.tar.gz
utils-885af08edef3eede81101d4303e3a025dc078449.tar.bz2
utils-885af08edef3eede81101d4303e3a025dc078449.tar.xz
utils-885af08edef3eede81101d4303e3a025dc078449.zip
cleanup, rebuild-system
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 $@