mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 23:14:57 +08:00
Clone some git repos through ssh jump
Useful if that machine (vanjaram) can clone repos, but localhost cannot.
This commit is contained in:
parent
d488a2d80c
commit
d60dccf4dc
1 changed files with 20 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue