From 46d0312b587b862fecfbada564433264b0b7dc84 Mon Sep 17 00:00:00 2001 From: Angelo Noto Date: Sat, 20 Jun 2026 23:36:05 -0400 Subject: [PATCH] add wsl related stuff --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ bash/.bashrc.d/wsl.bash | 6 ++++++ 2 files changed, 46 insertions(+) create mode 100644 README.md create mode 100644 bash/.bashrc.d/wsl.bash diff --git a/README.md b/README.md new file mode 100644 index 0000000..4924872 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# dotfiles + + +## Stow + +1. Install it: +``sudo dnf install stow`` + +2. Organize your repo like this: +``` +~/dotfiles/ +├── bash/ +│ ├── .bashrc +│ └── .bashrc.d/ # everything here +├── nvim/ +│ └── .config/nvim/ +├── git/ +│ └── .gitconfig +└── ... +``` +3. stow it: +``` +cd ~/dotfiles +stow bash +stow nvim +stow git +``` +stow creates the symlinks automatically and handles conflicts nicely. + +## WSL +[![OpenSSH](https://img.shields.io/badge/Windows-OpenSSH?style=flat-square&label=OpenSSH&color=blue +)](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell&pivots=windows-11) + +In windows enable OpenSSH Agent + +(Learn OpenSSH)[] +```powershell +Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*' + +``` \ No newline at end of file diff --git a/bash/.bashrc.d/wsl.bash b/bash/.bashrc.d/wsl.bash new file mode 100644 index 0000000..2d77c77 --- /dev/null +++ b/bash/.bashrc.d/wsl.bash @@ -0,0 +1,6 @@ +# WSL aliases: require C: drive mount AND working Windows binary interop +if [[ -d /mnt/c ]] && command -v ssh.exe &>/dev/null && ssh.exe -V &>/dev/null 2>&1; then + alias ssh-add='ssh-add.exe' + alias ssh='ssh-add.exe -l > /dev/null || ssh-add.exe && echo -e "\e[92mssh-key(s) are now available in your ssh-agent until you lock your windows machine! \n \e[0m" && ssh.exe' + export GIT_SSH_COMMAND=ssh.exe +fi \ No newline at end of file