diff options
Diffstat (limited to 'rebuild-system')
| -rw-r--r-- | rebuild-system | 11 |
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 | |||
| 3 | if [[ "$USER" != "root" ]]; then | ||
| 4 | exec sudo -- $0 $@ | ||
| 5 | fi | ||
| 6 | |||
| 7 | path=/etc/nixos | ||
| 8 | |||
| 9 | git -C $path pull && \ | ||
| 10 | git -C $path submodule update && \ | ||
| 11 | nixos-rebuild $@ | ||
