Skip to content

Commit

Permalink
home: custom ssh proxy for different machines
Browse files Browse the repository at this point in the history
  • Loading branch information
inclyc committed Jan 18, 2024
1 parent d2e6e57 commit 33dbdc3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
5 changes: 5 additions & 0 deletions home/lyc/configurations/aplaz/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{ pkgs, config, lib, ... }:
{

imports = [
./ssh-proxy.nix
];

services.kdeconnect.enable = true;

programs.vscode = {
Expand Down
15 changes: 15 additions & 0 deletions home/lyc/configurations/aplaz/ssh-proxy.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ ... }:
let
metisProxyICT = "llvmws.lyc.dev:20179";
metisProxySW = "llvmws.lyc.dev:20178";
proxyCommandSW = "nc -x ${metisProxySW} %h %p";
proxyCommandICT = "nc -x ${metisProxyICT} %h %p";
in
{
programs.ssh.matchBlocks = {
ict-malcon.proxyCommand = proxyCommandICT;
ict-sw.proxyCommand = proxyCommandICT;
ict-repo.proxyCommand = proxyCommandICT;
swyjs.proxyCommand = proxyCommandSW;
};
}
3 changes: 1 addition & 2 deletions home/lyc/modules/programs/ssh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
port = 20122;
};
adrastea = {
hostname = "adrastea.lyc.dev";
hostname = "10.231.0.2";
user = "lyc";
port = 22;
};
Expand All @@ -33,7 +33,6 @@
hostname = "40.0.1.110";
user = "swyjs";
port = 22;
proxyCommand = "nc -x 127.0.0.1:1081 %h %p";
};
ict-malcon = {
hostname = "10.3.2.104";
Expand Down

0 comments on commit 33dbdc3

Please sign in to comment.