refactor(shell): modularize shell config into per-shell profiles and conf.d

Split bash config into dedicated aliases and profile files. Extract
fish shell init from config.fish into composable conf.d fragments
(setup, environment, ssh-auth-sock). Remove the generic profile in
favor of the bash-specific one. Add a static SSH_AUTH_SOCK symlink
so tmux sessions always see the current socket regardless of which
shell spawned them.
This commit is contained in:
2026-07-24 14:53:30 -04:00
parent 5db0ff0011
commit 98f809dfe5
9 changed files with 90 additions and 42 deletions
+36
View File
@@ -0,0 +1,36 @@
append_path () {
case ":$PATH:" in
*:"$1":*)
;;
*)
PATH="${PATH:+$PATH:}$1"
esac
}
append_path "$HOME/.local/bin"
append_path "$HOME/.cargo/bin"
export PATH
if [ test -x $(command -v mise) ]; then
eval "$(mise activate bash)"
fi
if [ test -x $(command -v zoxide) ]; then
eval "$(zoxide init bash)"
fi
if [ test -x $(command -v fzf) ]; then
eval "$(fzf --bash)"
fi
if [ -z "$SSH_CONNECTION" ]; then
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
fi
# Create a predictable symlink pointing to the current SSH auth socket
auth_sock="$HOME/.ssh/ssh_auth_sock"
if [ -n "$SSH_AUTH_SOCK" ] && [ "$SSH_AUTH_SOCK" != "$auth_sock" ]; then
mkdir -p "$HOME/.ssh"
ln -sf "$SSH_AUTH_SOCK" "$auth_sock"
fi