diff --git a/.bashrc b/.bashrc index 7bf3420..6768064 100644 --- a/.bashrc +++ b/.bashrc @@ -139,5 +139,7 @@ export PATH="$PATH:/opt/nvim-linux-x86_64/bin" export PATH="$PATH:/home/wholteza/.local/bin" export PATH=$PATH:/home/wholteza/.local/bin +source ~/.config/relay-ssh-agent.sh + eval "$(oh-my-posh init bash --config ~/.config/oh-my-posh/theme.omp.json)" [[ -z "$TMUX" ]] && exec tmux diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 5a307df..a6e174f 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -5,6 +5,8 @@ local nvm_bin = os.getenv 'NVM_BIN' local vue_typescript_plugin_path = nvm_bin .. '/../lib/node_modules/@vue/typescript-plugin' +vim.loader.enable() + -- "sh" to [s]earch the [h]elp documentation. -- Set as the leader key diff --git a/.config/relay-ssh-agent.sh b/.config/relay-ssh-agent.sh new file mode 100755 index 0000000..7fb9129 --- /dev/null +++ b/.config/relay-ssh-agent.sh @@ -0,0 +1,11 @@ +export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock +rm -f $SSH_AUTH_SOCK +(setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork &) >/dev/null 2>&1 + +# Check if the socket already exists +ss -a | grep -q $SSH_AUTH_SOCK +if [ $? -ne 0 ]; then + # Start a new socat process + rm -f $SSH_AUTH_SOCK + (setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork &) >/dev/null 2>&1 +fi diff --git a/.config/requirements/install.sh b/.config/requirements/install.sh index 73c915a..e7c4975 100755 --- a/.config/requirements/install.sh +++ b/.config/requirements/install.sh @@ -6,7 +6,12 @@ sudo apt install \ unzip \ ripgrep \ fzf \ - fd-find + fd-find \ + wget \ + golang-go \ + socat \ + -y + curl -s https://ohmyposh.dev/install.sh | bash -s @@ -17,3 +22,16 @@ sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz # Install nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash + +# Set up ssh-agent from windows + +cd ~/.config +rm -rf npiperelay +git clone https://github.com/jstarks/npiperelay +go version +cd npiperelay +# Build the binary and store it in our Windows C: drive +go get -d github.com/jstarks/npiperelay +GOOS=windows go build -o /mnt/c/temp/npiperelay.exe github.com/jstarks/npiperelay +# Create a symlink to a directory in our PATH +sudo ln -s /mnt/c/temp/npiperelay.exe /usr/local/bin/npiperelay.exe