From 8d4bdcde43eb1d081024211980946379e9dd4f17 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Wed, 6 Apr 2022 22:20:03 +0200 Subject: [PATCH] ssh: Set IdentityAgent --- config/ssh.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/ssh.nix b/config/ssh.nix index d1103e2..d600bf4 100644 --- a/config/ssh.nix +++ b/config/ssh.nix @@ -1,6 +1,7 @@ { config, ... }: let + auth-socket = "${config.home.homeDirectory}/.ssh/1password.sock"; signers-directory = "${config.home.homeDirectory}/.ssh/allowed_signers"; in { @@ -12,6 +13,7 @@ in hashKnownHosts = true; serverAliveInterval = 60; extraConfig = '' + IdentityAgent "${auth-socket}" UpdateHostKeys ask 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}" = { source = ../config/ssh/allowed_signers;