Guide: How to use 1Password SSH WSL integration with programs other than Git #589
songpola
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, everyone!
I would like to share how I make 1Password SSH work with programs other than Git in NixOS-WSL.
According to the 1Password docs:
You can configure Git to use
ssh.exe, but not all programs can be configured like this.For example, when using Docker Context.
My solution is to substitute the system
opensshpackage for a custom one that symlinkedsshandssh-addbins to the OpenSSHssh.exeandssh-add.exeon Windows, respectively. (Path:/mnt/c/Windows/System32/OpenSSH/)So, I create a new derivation (package), using
symlinkJoin(to avoid recompiling theopensshpackage), and then set theprograms.ssh.packageNixOS option to it.You can check my
nixos-configfor example.ssh-wsl-winderivation packagesnowfall-lib, so the package is automatically included inpkgs(just like an overlay).$out/bin/*bins to$out/bin/*-wslfor backup (ssh -> ssh-wsl,ssh-add -> ssh-add-wsl)programs.ssh.packagesongpolaby thesnowfall-lib.This way, you can use
sshandssh-addas usual, and other programs will use it too. (You don't even need to alias them in the shells!) And if you somehow want to use the original commands, then you can just usessh-wslandssh-add-wsl.Beta Was this translation helpful? Give feedback.
All reactions