Commit e92e414e6ac9
Changed files (1)
home
common
shell
home/common/shell/openssh.nix
@@ -65,6 +65,15 @@ in
# Route ssh through the front ssh-tpm-agent (TPM key + proxied FIDO2 keys).
SSH_AUTH_SOCK = lib.mkForce "$XDG_RUNTIME_DIR/ssh-tpm-agent.sock";
};
+
+ # The hm-session-vars export above only affects login shells. GUI terminals
+ # spawned under niri inherit the systemd user manager environment, so set
+ # SSH_AUTH_SOCK there too via environment.d (read by the user manager at login).
+ xdg.configFile = lib.mkIf isAomi {
+ "environment.d/95-ssh-auth-sock.conf".text = ''
+ SSH_AUTH_SOCK=''${XDG_RUNTIME_DIR}/ssh-tpm-agent.sock
+ '';
+ };
programs.ssh = {
enable = true;
enableDefaultConfig = false;