From 18a880c5aacf074dedcddfbd0d8b6ed75d6e7dc8 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 23 Jun 2023 07:16:40 +0200 Subject: darwin: ensure SSH_AUTH_SOCK is always set --- user/settings/darwin.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'user/settings') diff --git a/user/settings/darwin.nix b/user/settings/darwin.nix index 1ffac101..7c0adb0d 100644 --- a/user/settings/darwin.nix +++ b/user/settings/darwin.nix @@ -72,7 +72,7 @@ LowPriorityBackgroundIO = true; }; }; - set-xdg-cache-home = { + setenv = { enable = true; config = { @@ -81,6 +81,8 @@ "setenv" "XDG_CACHE_HOME" config.xdg.cacheHome + "SSH_AUTH_SOCK" + config.programs.zsh.sessionVariables.SSH_AUTH_SOCK ]; RunAtLoad = true; StandardErrorPath = "/dev/null"; @@ -137,13 +139,14 @@ dig = "dig +noall +answer"; }; + programs.zsh.sessionVariables = { + SSH_AUTH_SOCK = "~/.strongbox/agent.sock"; + }; + programs.zsh.envExtra = '' SHELL_SESSIONS_DISABLE=1 path+=($HOME/Library/Python/3.9/bin) ''; - programs.ssh.extraConfig = '' - IdentityAgent ~/.strongbox/agent.sock - ''; home.activation.linkStrongboxSSHAgentSocket = lib.hm.dag.entryAfter [ "writeBoundary" ] '' if [[ ! -d ~/.strongbox ]] then -- cgit 1.4.1