Sfoglia il codice sorgente

feat(ssh): fixing ssh to work with forgejo

Zander Hawke 1 mese fa
parent
commit
83374694f1
1 ha cambiato i file con 38 aggiunte e 25 eliminazioni
  1. 38 25
      home/features/cli/ssh.nix

+ 38 - 25
home/features/cli/ssh.nix

@@ -12,35 +12,48 @@
       StreamLocalBindUnlink yes
     '';
 
-    matchBlocks."*" = {
-      setEnv.TERM = "xterm-256color";
-      forwardAgent = true;
-      compression = true;
-      serverAliveInterval = 0;
-      serverAliveCountMax = 3;
-      hashKnownHosts = false;
-      userKnownHostsFile = "~/.ssh/known_hosts";
-    };
+    matchBlocks = {
+      "*" = {
+        setEnv.TERM = "xterm-256color";
+        forwardAgent = true;
+        compression = true;
+        serverAliveInterval = 0;
+        serverAliveCountMax = 3;
+        hashKnownHosts = false;
+        userKnownHostsFile = "~/.ssh/known_hosts";
+      };
 
-    matchBlocks.odin = {
-      hostname = "odin.taild019.ts.net";
-      user = "thomas";
-      forwardAgent = true;
-      remoteForwards = [
-        {
-          bind.address = "/run/user/1000/gnupg/d.o6jzqfigwppq1eps4nhng6n5/S.gpg-agent";
-          host.address = "/Users/thomas/.config/gnupg/S.gpg-agent.extra";
-        }
-      ];
-    };
+      "github.com".user = "git";
+      "codeberg.org".user = "git";
 
-    matchBlocks = {
       github.hostname = "github.com";
-      github.user = "git";
       codeberg.hostname = "codeberg.org";
-      codeberg.user = "git";
-      "github.com".user = "git";
-      "codeberg.org".user = "git";
+
+      git = {
+        hostname = "192.168.1.3";
+        port = 2222;
+        user = "forgejo";
+        proxyJump = "odin";
+        forwardAgent = true;
+      };
+
+      "git.odin.t5.st" = {
+        hostname = "192.168.1.3";
+        proxyJump = "odin";
+        forwardAgent = true;
+      };
+
+      odin = {
+        hostname = "odin.taild019.ts.net";
+        user = "thomas";
+        forwardAgent = true;
+        remoteForwards = [
+          {
+            bind.address = "/run/user/1000/gnupg/d.o6jzqfigwppq1eps4nhng6n5/S.gpg-agent";
+            host.address = "/Users/thomas/.config/gnupg/S.gpg-agent.extra";
+          }
+        ];
+      };
     };
   };
 }