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 $@