- Working on Windows 10, on Windows filesystem
- Having a visually nice terminal (Windows Terminal)
- zsh as my main shell
- Download Git for Windows SDK
- Run the exe (can take 10+ minutes)
#!/bin/bash
# Set username and email for next commands
email="[email protected]"
username="Alex-D"
gpgkeyid="8FA78E6580B1222A"
# Configure Git
git config --global user.email "${email}"
git config --global user.name "${username}"
git config --global user.signingkey "${gpgkeyid}"
git config --global commit.gpgsign true
git config --global gpg.program "$HOME/dev/dotfiles/git-bash/.gpg-pinentry-loopback"
git config --global core.pager /usr/bin/less
git config --global core.excludesfile ~/.gitignore
# Use ssh key from WSL2
git config --global core.sshCommand "ssh -i //wsl$/Ubuntu/home/ademode/.ssh/id_rsa"
#!/bin/bash
pacman -S zsh
# Launch zsh
zsh
# Clone the dotfiles repository
mkdir -p ~/dev/dotfiles
git clone [email protected]:Alex-D/dotfiles.git ~/dev/dotfiles
# Link custom dotfiles
ln -sf ~/dev/dotfiles/.aliases.zsh ~/.aliases.zsh
ln -sf ~/dev/dotfiles/.p10k.zsh ~/.p10k.zsh
ln -sf ~/dev/dotfiles/.zshrc ~/.zshrc
ln -sf ~/dev/dotfiles/.gitignore ~/.gitignore
ln -sf ~/dev/dotfiles/git-bash/.zsh_plugins.zsh ~/.zsh_plugins.zsh
# GPG Agent
mkdir ~/.gnupg
ln -sf ~/dev/dotfiles/git-bash/gpg-agent.conf ~/.gnupg/gpg-agent.conf
gpg-connect-agent reloadagent /bye
# Git autocompletion
mkdir -p ~/.zsh
cd ~/.zsh
curl -o git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
curl -o _git https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.zsh
Import all GPG keys from WSL 2
wsl.exe gpg -a --export-secret-keys | gpg --import --pinentry-mode loopback