diff --git a/setup.sh b/setup.sh index 011a172..d60093d 100755 --- a/setup.sh +++ b/setup.sh @@ -7,6 +7,12 @@ if [ "$(id -u)" -ne 0 ]; then exit 1 fi +# Check if git is installed +if ! command -v git >/dev/null 2>&1; then + echo "Git not found. Installing git..." + apt-get update && apt-get install -y git +fi + # Install mode INSTALL_DIR="/usr/local/bin" REPO_DIR="/root/.nixos-utils"