mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-10 00:25:57 +08:00
refactor: pass host
This commit is contained in:
parent
b6469db021
commit
929ddd404a
1 changed files with 8 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue