diff --git a/home/desktop/default.nix b/home/desktop/default.nix index 568f07b..49db150 100644 --- a/home/desktop/default.nix +++ b/home/desktop/default.nix @@ -61,6 +61,20 @@ in }; }; + # At home, ssh to gitea goes straight to jupiter instead of out to neptun and + # back over the tailnet; away, the probe fails and the public route applies. + # The alias matches the existing known_hosts entry (same gitea host key). + # LFS rides the same connection via LFS_ALLOW_PURE_SSH (services/dev/gitea.nix). + programs.ssh = { + enable = true; + enableDefaultConfig = false; + matchBlocks.gitea-lan = { + match = ''host git.mgaction.town exec "${pkgs.netcat}/bin/nc -z -w1 10.0.0.20 2222"''; + hostname = "10.0.0.20"; + extraOptions.HostKeyAlias = "[git.mgaction.town]:2222"; + }; + }; + # direnv + nix-direnv: lets per-repo devShells (e.g. /mnt/hdd_01/dev/repos/Tome's # flake.nix) auto-load in the shell AND in Rider via its "direnv # integration" plugin, instead of every dev repo needing its own diff --git a/services/dev/gitea.nix b/services/dev/gitea.nix index 47f8a01..aeeba7f 100644 --- a/services/dev/gitea.nix +++ b/services/dev/gitea.nix @@ -61,6 +61,9 @@ in START_SSH_SERVER = true; SSH_PORT = 2222; SSH_LISTEN_PORT = 2222; + # LFS objects over the ssh connection itself; otherwise git-lfs fetches + # them from ROOT_URL, i.e. through neptun, even on an ssh remote. + LFS_ALLOW_PURE_SSH = true; }; service = { DISABLE_REGISTRATION = true;