diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-12-03 21:19:39 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-12-03 21:49:54 -0600 |
| commit | 61f3db56410f41d5249c88e44db60d9713dae26d (patch) | |
| tree | 49c2d5d5e4da331d139cfdc6034c0dba5980271b /home/ssh | |
| parent | 854f5ee287eb66db5a0713e2f4fac56794e3d735 (diff) | |
home: big refactor
Diffstat (limited to '')
| -rw-r--r-- | home/environ/ssh.nix (renamed from home/ssh/default.nix) | 11 | ||||
| -rw-r--r-- | home/ssh/match.nix | 82 |
2 files changed, 7 insertions, 86 deletions
diff --git a/home/ssh/default.nix b/home/environ/ssh.nix index 220d18d..29829be 100644 --- a/home/ssh/default.nix +++ b/home/environ/ssh.nix @@ -1,7 +1,10 @@ { config, lib, pkgs, ... }: -with lib; { - config = { - programs.ssh = mkIf (!config.home.isolation.active) { +with lib; let + cfg = config.local.environ; +in +{ + config = mkIf cfg.enable { + programs.ssh = { enable = true; compression = true; @@ -10,7 +13,7 @@ with lib; { extraOptionOverrides.AddKeysToAgent = "true"; - matchBlocks = import ./match.nix; + matchBlocks = import ./ssh-match.nix; }; systemd.user.tmpfiles.rules = [ diff --git a/home/ssh/match.nix b/home/ssh/match.nix deleted file mode 100644 index 4209e9b..0000000 --- a/home/ssh/match.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ - "34" = { - hostname = "34project.org"; - port = 2234; - serverAliveInterval = 30; - }; - - "gate.34project.org" = { - serverAliveInterval = 30; - }; - - "hv" = { - port = 2242; - hostname = "::1"; - - user = "root"; - identityFile = "~/.ssh/id_hv_sk"; - identitiesOnly = true; - }; - - "olger.dev" = { - hostname = "201.205.177.184"; - port = 1025; - }; - - "ramips" = { - hostname = "10.34.42.1"; - user = "root"; - }; - - "eric-8100" = { - hostname = "10.34.42.43"; - user = "admin"; - }; - - "hackintosh" = { - hostname = "10.34.42.44"; - user = "ileana"; - }; - - "ramips-lan" = { - hostname = "192.168.34.1"; - user = "root"; - }; - - "xiaomi-lan" = { - hostname = "192.168.42.6"; - user = "u0_a89"; - port = 8022; - }; - - "eric-8100-lan" = { - hostname = "192.168.42.18"; - user = "admin"; - }; - - "github.com" = { - identitiesOnly = true; - identityFile = "~/.ssh/id_rsa"; - user = "git"; - }; - - # Cambiar esto por "itcr3442@github.com" (matchBlocks.*.match aparecerá en 23.05) - "github-itcr" = { - identitiesOnly = true; - identityFile = "~/.ssh/id_klein"; - user = "git"; - hostname = "github.com"; - }; - - "kiev" = { - user = "u0_a177"; - port = 8022; - hostname = "10.34.42.2"; - }; - - "kiev-lan" = { - user = "u0_a177"; - port = 8022; - hostname = "192.168.34.211"; - }; -} |
