diff --git a/setup.sh b/setup.sh index 81646c6..49fc667 100755 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash NIXOS_RELEASE=24.05 +GIT_REPO=https://git.mvl.sh/vleeuwenmenno/dotfiles.git # Check if $HOME/.dotfiles-setup exists, if so exit because setup has already been run if [ -f $HOME/.dotfiles-setup ]; then @@ -8,6 +9,14 @@ if [ -f $HOME/.dotfiles-setup ]; then exit 0 fi +# Check if $HOME/dotfiles exists, if not clone the dotfiles repo +if [ ! -d $HOME/dotfiles ]; then + tput setaf 3 + echo "Cloning dotfiles repo..." + tput sgr0 + git clone $GIT_REPO $HOME/dotfiles +fi + install_nix() { if [ -x "$(command -v nixos-version)" ]; then tput setaf 2