From 5f9ef707dd5abb5213db615dc4ae891fd514f89b Mon Sep 17 00:00:00 2001 From: Andrei Zhigalkin Date: Sat, 2 May 2026 18:30:09 +0000 Subject: [PATCH] Pre-configure `SSH_AUTH_SOCK` globally Noticed https://invent.kde.org/kde-linux/kde-linux/-/commit/1e99880831af89c7564e3ff368c2d278b8a553a1 and thought this might be beneficial for other shells as well. --- mkosi.extra/usr/lib/environment.d/60-ssh-auth-sock.conf | 6 ++++++ .../plugins/kde-linux-default/kde-linux-default-zshrc.zsh | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 mkosi.extra/usr/lib/environment.d/60-ssh-auth-sock.conf diff --git a/mkosi.extra/usr/lib/environment.d/60-ssh-auth-sock.conf b/mkosi.extra/usr/lib/environment.d/60-ssh-auth-sock.conf new file mode 100644 index 0000000..7322647 --- /dev/null +++ b/mkosi.extra/usr/lib/environment.d/60-ssh-auth-sock.conf @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL +# SPDX-FileCopyrightText: None + +# Set up auth sock for systemd-initiated ssh agent so the user doesn't +# have to faff about with this +SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket diff --git a/mkosi.extra/usr/share/zsh/plugins/kde-linux-default/kde-linux-default-zshrc.zsh b/mkosi.extra/usr/share/zsh/plugins/kde-linux-default/kde-linux-default-zshrc.zsh index b38b276..ce34d39 100644 --- a/mkosi.extra/usr/share/zsh/plugins/kde-linux-default/kde-linux-default-zshrc.zsh +++ b/mkosi.extra/usr/share/zsh/plugins/kde-linux-default/kde-linux-default-zshrc.zsh @@ -118,7 +118,3 @@ source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring # Bind Ctrl+↑ and Ctrl+↓ keybinds to substring history search. bindkey '^[[1;5A' history-substring-search-up # Ctrl+↑ bindkey '^[[1;5B' history-substring-search-down # Ctrl+↓ - -# Set up auth sock for systemd-initiated ssh agent so the user doesn't -# have to faff about with this -export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"