11 lines
345 B
Nix
11 lines
345 B
Nix
{ ... }: {
|
|
programs.bash = {
|
|
enable = true;
|
|
shellAliases = {
|
|
ssh-with-yubikey = "ssh_with_yubikey";
|
|
};
|
|
bashrcExtra = ''
|
|
ssh_with_yubikey () { AGENT_SOCKET=$(ssh $@ gpgconf --list-dirs agent-socket) && ssh -A -R "$AGENT_SOCKET:$(gpgconf --list-dirs agent-socket)" -o "StreamLocalBindUnlink=yes" $@; }
|
|
'';
|
|
};
|
|
}
|