add wsl related stuff
This commit is contained in:
@@ -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
|
||||
[](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*'
|
||||
|
||||
```
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user