summaryrefslogtreecommitdiff
path: root/rebuild-system
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-05-14 18:48:51 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-05-14 18:48:51 +0200
commit2968aa8fb03db8c8d27c8a7669fb362efd40c6cc (patch)
tree48e6fb5389d41d4128bff0a11168fc470230e6c6 /rebuild-system
parent7782c7fcc926f04a948bdfca79929cad759fca73 (diff)
parentdd28d96d3469a46888ac4e1103818978aa4fc51b (diff)
downloadutils-2968aa8fb03db8c8d27c8a7669fb362efd40c6cc.tar
utils-2968aa8fb03db8c8d27c8a7669fb362efd40c6cc.tar.gz
utils-2968aa8fb03db8c8d27c8a7669fb362efd40c6cc.tar.bz2
utils-2968aa8fb03db8c8d27c8a7669fb362efd40c6cc.tar.xz
utils-2968aa8fb03db8c8d27c8a7669fb362efd40c6cc.zip
Merge ymir:.nixpkgs/utils
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 $@