Clone some git repos through ssh jump

Useful if that machine (vanjaram) can clone repos, but localhost cannot.
This commit is contained in:
Sridhar Ratnakumar 2024-07-01 18:14:15 -04:00
parent d488a2d80c
commit d60dccf4dc
No known key found for this signature in database

View file

@ -1,6 +1,25 @@
# For Juspay work
{ pkgs, lib, ... }:
let
# I don't care to connect to VPN on my macbook
# So, I'll clone through an office machine
gitCloneThroughVanjaram =
let
host = "vanjaram";
port = 5445;
gitSshRemote = "ssh.bitbucket.juspay.net";
in
{
programs.ssh.matchBlocks = {
${host}.dynamicForwards = [{ inherit port; }];
${gitSshRemote} = {
user = "git";
proxyCommand = "nc -x localhost:${builtins.toString port} %h %p";
};
};
};
in
{
imports = [ gitCloneThroughVanjaram ];
programs.ssh = {
matchBlocks = {
# Juspay machines (through Tailscale)