Skip to content

Commit

Permalink
fix(pivy): Set SSH_AUTH_SOCK
Browse files Browse the repository at this point in the history
  • Loading branch information
aiotter committed Jan 17, 2024
1 parent 5fc5fcf commit ea7ccb2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 23 deletions.
62 changes: 40 additions & 22 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion modules/pivy-agent/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ in

# programs.ssh.extraOptionOverrides.IdentityAgent = cfg.socket;

programs.bash.profileExtra = "export SSH_AUTH_SOCK=\${SSH_AUTH_SOCK:-${cfg.socket}}";
programs.bash.profileExtra = ''
if [[ ! -e "$SSH_AUTH_SOCK" || "$SSH_AUTH_SOCK" == *${if pkgs.stdenv.isDarwin then "launchd" else "/keyring/"}* ]]; then
export SSH_AUTH_SOCK="${cfg.socket}"
fi
'';
};
}

0 comments on commit ea7ccb2

Please sign in to comment.