chore: adds various WSL related fixes
This commit is contained in:
6
.zshrc
6
.zshrc
@@ -80,6 +80,12 @@ if [ -t 1 ]; then
|
||||
alias ls='l'
|
||||
fi
|
||||
|
||||
# Alias for ssh.exe and ssh-add.exe on Windows WSL (microsoft-standard-WSL2)
|
||||
if [[ $(uname -a) == *"microsoft-standard-WSL2"* ]]; then
|
||||
alias ssh='ssh.exe'
|
||||
alias ssh-add='ssh-add.exe'
|
||||
fi
|
||||
|
||||
######################
|
||||
# Export Definitions #
|
||||
######################
|
||||
|
@@ -35,7 +35,12 @@ ensure_symlink() {
|
||||
|
||||
# Fetch source from YAML based on OS
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
# Check for WSL2
|
||||
if [[ $(uname -a) == *"microsoft-standard-WSL2"* ]]; then
|
||||
source=$(shyaml get-value "config.symlinks.$1.sources.wsl" < "$HOME/dotfiles/config/config.yaml") 2>/dev/null
|
||||
else
|
||||
source=$(shyaml get-value "config.symlinks.$1.sources.linux" < "$HOME/dotfiles/config/config.yaml") 2>/dev/null
|
||||
fi
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
source=$(shyaml get-value "config.symlinks.$1.sources.macos" < "$HOME/dotfiles/config/config.yaml") 2>/dev/null
|
||||
fi
|
||||
|
@@ -6,6 +6,7 @@ config:
|
||||
sources:
|
||||
macos: ~/dotfiles/config/gitconfig.macos
|
||||
linux: ~/dotfiles/config/gitconfig.linux
|
||||
wsl: ~/dotfiles/config/gitconfig.wsl
|
||||
target: ~/.gitconfig
|
||||
|
||||
# SSH config
|
||||
|
31
config/gitconfig.wsl
Normal file
31
config/gitconfig.wsl
Normal file
@@ -0,0 +1,31 @@
|
||||
[user]
|
||||
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM+sKpcREOUjwMMSzEWAso6830wbOi8kUxqpuXWw5gHr
|
||||
email = menno@vleeuwen.me
|
||||
name = Menno van Leeuwen
|
||||
|
||||
[gpg]
|
||||
format = ssh
|
||||
|
||||
[gpg "ssh"]
|
||||
program = "/mnt/c/Users/menno/AppData/Local/1Password/app/8/op-ssh-sign-wsl"
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
||||
|
||||
[color]
|
||||
ui = true
|
||||
[push]
|
||||
autoSetupRemote = true
|
||||
[pull]
|
||||
rebase = false
|
||||
[filter "lfs"]
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
[core]
|
||||
sshCommand = ssh.exe
|
||||
[url "ssh://git@"]
|
||||
insteadOf = https://
|
||||
[safe]
|
||||
directory = *
|
Reference in New Issue
Block a user