Skip to content

Commit 197d0a2

Browse files
committed
nixos: improve link-dotfiles to clone dotfiles in HTTPS mode as fallback
1 parent a03e2dc commit 197d0a2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nixos/bin/link-dotfiles.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ declare -A appMappings=(
3232

3333
if [ ! -d "$HOME/dotfiles" ]; then
3434
echo "Cloning dotfiles to $HOME/dotfiles..."
35-
git clone [email protected]:zahidkizmaz/dotfiles.git "$HOME/dotfiles"
35+
clone_cmd="git clone [email protected]:zahidkizmaz/dotfiles.git $HOME/dotfiles"
36+
if ! $clone_cmd; then
37+
echo "SSH clone failed, falling back to HTTPS. Remember to set the remote directory to SSH later."
38+
git clone https://github.com/zahidkizmaz/dotfiles.git "$HOME/dotfiles"
39+
fi
3640
fi
3741
cd "$HOME/dotfiles/" || exit
3842
for app in "${!appMappings[@]}"; do

0 commit comments

Comments
 (0)