This repository contains my dotfiles to help setup and maintain my development environment across WSL and macOS. It uses GNU Stow for symlink management (thanks @micku!) and aims to keep things minimal and bloat-free.
Feel free to explore, learn, and copy parts for your own dotfiles.
Read more about GNU Stow method
https://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html
Install these tools before applying the dotfiles:
- Wezterm - Terminal emulator
- GNU Stow - Dotfile symlink manager
- Zsh - Shell
- xclip - Clipboard integration (Linux only)
- fnm - Fast Node Manager
- npiperelay (Windows side) - SSH agent bridge
- socat (WSL side) - Install via your package manager
Once prerequisites are installed:
# Clone the repository
git clone <your-repo-url> ~/.dotfiles
# Navigate to packages directory
cd ~/.dotfiles/packages
# Apply all
stow */cd ~/.dotfiles/packages
# Install only what you need
stow zsh
stow weztermcd ~/.dotfiles
git pull
cd packages
stow --restow */WSL closes ssh-agent when the environment shuts down. The solution is to run ssh-agent on Windows and bridge it to WSL, so keys persist across sessions.
Ensure Windows OpenSSH agent is running and set to autostart and add your private keys to the agent.
In PowerShell (as Administrator):
# Enable and start SSH agent in Powershell with admin powers
Get-Service ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agentIn a regular (non-admin) terminal window:
# Add the keys in a terminal WITHOUT admin powers
ssh-add C:\Users\<username>\.ssh\<keyname>
# Verify all keys are loaded
ssh-add -lwinget install --id=jstarks.npiperelay -e# Ubuntu
sudo apt install socatAfter restarting WSL, test the connection:
# Verify socket is set
echo $SSH_AUTH_SOCK
# List loaded keys
ssh-add -l
# Test GitHub authentication
ssh -T [email protected]GitHub supports SSH-based commit signing as an alternative to GPG keys.
# Enable SSH signing format
git config --global gpg.format ssh
# Set your signing key (use public key path)
git config --global user.signingkey <path-to-pubkey>
# Create allowed signers file for local verification
touch ~/.ssh/allowed_signers
echo "$(git config --global user.email) $(cat <path-to-pubkey>)" >> ~/.ssh/allowed_signers
# Configure allowed signers file location
git config --global gpg.ssh.allowedSignersFile ~/.ssh/allowed_signers
# Enable automatic commit signing
git config --global commit.gpgsign true