diff --git a/hosts/m3-hermes/services/t3code.nix b/hosts/m3-hermes/services/t3code.nix index 13e7e42..32246fd 100644 --- a/hosts/m3-hermes/services/t3code.nix +++ b/hosts/m3-hermes/services/t3code.nix @@ -71,7 +71,7 @@ t3SshConfig = pkgs.writeText "t3-gitea-ssh-config" '' Host code.m3ta.dev User gitea - IdentityFile ~/.ssh/gitea + IdentityFile ${cockpitHome}/.ssh/gitea IdentitiesOnly yes ''; @@ -137,6 +137,13 @@ in { environment = { T3CODE_PORT = toString port; + # Deterministic service context: HOME explicit so ssh/git resolve + # ~ in every process this service spawns, however deep t3's + # pty/sandbox chain resets the environment. + HOME = cockpitHome; + # Independent of HOME entirely: git uses exactly this ssh config + # (absolute store path) for every gitea remote. + GIT_SSH_COMMAND = "ssh -F ${t3SshConfig}"; } // gitIdentityEnv;