services/ssh: add keys to agent automatically

This commit is contained in:
Anthony Rodriguez 2025-01-30 15:05:48 +01:00
parent 080e3fb0db
commit fb5ed25b58
Signed by: nezia
SSH key fingerprint: SHA256:Ihfpl0rUpqDevYqnzSR34OYfVLbDNkBiUjs3CpX4ykA

View file

@ -2,10 +2,20 @@
lib,
config,
...
}: {
}: let
inherit (config.local.systemVars) username;
in {
config = lib.mkIf config.local.profiles.desktop.enable {
programs.ssh = {
startAgent = true;
};
hjem.users.${username} = {
files = {
".ssh/config".text = ''
AddKeysToAgent yes
'';
};
};
};
}