System/home-manager/modules/programs/ssh-agent.nix

17 lines
233 B
Nix

{
config,
lib,
pkgs,
...
}: {
# Enable the agent
services.ssh-agent = {
enable = true;
};
# Setup fish init
programs.fish.shellInit =
''
set -x SSH_AUTH_SOCK $XDG_RUNTIME_DIR/ssh-agent
ssh-add
'';
}