1
0
Fork 0

ssh: Set IdentityAgent

This commit is contained in:
Daniel Kempkens 2022-04-06 22:20:03 +02:00
parent 8bf04b2e17
commit 8d4bdcde43

View file

@ -1,6 +1,7 @@
{ config, ... }: { config, ... }:
let let
auth-socket = "${config.home.homeDirectory}/.ssh/1password.sock";
signers-directory = "${config.home.homeDirectory}/.ssh/allowed_signers"; signers-directory = "${config.home.homeDirectory}/.ssh/allowed_signers";
in in
{ {
@ -12,6 +13,7 @@ in
hashKnownHosts = true; hashKnownHosts = true;
serverAliveInterval = 60; serverAliveInterval = 60;
extraConfig = '' extraConfig = ''
IdentityAgent "${auth-socket}"
UpdateHostKeys ask UpdateHostKeys ask
VerifyHostKeyDNS yes VerifyHostKeyDNS yes
''; '';
@ -74,7 +76,7 @@ in
]; ];
}; };
home.sessionVariables.SSH_AUTH_SOCK = "${config.home.homeDirectory}/.ssh/1password.sock"; home.sessionVariables.SSH_AUTH_SOCK = "${auth-socket}";
home.file."${signers-directory}" = { home.file."${signers-directory}" = {
source = ../config/ssh/allowed_signers; source = ../config/ssh/allowed_signers;