fix(t3code): gitea SSH im Service HOME-unabhaengig machen #29

Merged
m3tam3re merged 1 commits from fix/t3code-ssh-hardening into master 2026-10-31 16:46:02 +01:00
+8 -1
View File
@@ -71,7 +71,7 @@
t3SshConfig = pkgs.writeText "t3-gitea-ssh-config" '' t3SshConfig = pkgs.writeText "t3-gitea-ssh-config" ''
Host code.m3ta.dev Host code.m3ta.dev
User gitea User gitea
IdentityFile ~/.ssh/gitea IdentityFile ${cockpitHome}/.ssh/gitea
IdentitiesOnly yes IdentitiesOnly yes
''; '';
@@ -137,6 +137,13 @@ in {
environment = environment =
{ {
T3CODE_PORT = toString port; 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; // gitIdentityEnv;