Make ssh agent settings autoheal in tmux.

This commit is contained in:
2025-10-29 20:55:46 +00:00
parent da85ee776d
commit 9415a8ece2
2 changed files with 8 additions and 1 deletions

View File

@@ -26,5 +26,11 @@
shellAliases = {
reload-home-manager-config = "home-manager switch --flake ${builtins.toString ./.}";
};
file.".ssh/rc".text = ''
#!/bin/sh
ln -sf "$SSH_AUTH_SOCK" "$HOME/.ssh/ssh_auth_sock"
'';
file.".ssh/rc".executable = true;
};
}

View File

@@ -327,7 +327,6 @@
enable = true;
shellAbbrs = {
fix-ssh = "eval $(tmux show-env | grep ^SSH_AUTH_SOCK | sed 's/=/ /;s/^/set /')";
diff-persist = "sudo rsync -amvxx --dry-run --no-links --exclude '/tmp/*' --exclude '/root/*' / /persist/ | rg -v '^skipping|/$'";
};
@@ -398,6 +397,8 @@
setw -g automatic-rename on
set -g set-titles on
set-environment -g 'SSH_AUTH_SOCK' $HOME/.ssh/ssh_auth_sock
'';
};
};