refactor: pass host

This commit is contained in:
Sridhar Ratnakumar 2024-07-05 10:57:00 -04:00
parent b6469db021
commit 929ddd404a
No known key found for this signature in database

View file

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