ssh: set SSH_AUTH_SOCK systemwide

This commit is contained in:
Bloxx12 2025-04-12 10:02:21 +02:00
commit 09d2901003
2 changed files with 3 additions and 5 deletions

View file

@ -3,11 +3,10 @@
in { in {
options.modules.programs.ssh.enable = mkEnableOption "ssh"; options.modules.programs.ssh.enable = mkEnableOption "ssh";
config = { config = {
# set the ssh socket globally. This alows all applications and shells to use
# the ssh-agent.
environment.sessionVariables.SSH_AUTH_SOCK = "/run/user/1000/ssh-agent";
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
# programs.ssh.pubkeyAcceptedKeyTypes = [
# "ssh-rsa"
# "ecdsa-sha2-nistp521"
# ];
services.openssh = { services.openssh = {
enable = true; enable = true;

View file

@ -28,7 +28,6 @@ in
buildInputs = [pkgs.makeWrapper]; buildInputs = [pkgs.makeWrapper];
postBuild = '' postBuild = ''
wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \ wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
--set SSH_AUTH_SOCK /run/user/1000/ssh-agent \
''; '';
}) })
.overrideAttrs (_: { .overrideAttrs (_: {