From aec14387c6651a4a067ef2ece4105210feeb4bc9 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 16 Jun 2023 17:00:05 +0200 Subject: Use Strongbox as an SSH agent instead of Secretive --- user/settings/darwin.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'user') diff --git a/user/settings/darwin.nix b/user/settings/darwin.nix index 99c71326..1ffac101 100644 --- a/user/settings/darwin.nix +++ b/user/settings/darwin.nix @@ -1,5 +1,6 @@ { config , pkgs +, lib , ... }: { nixpkgs.overlays = [ @@ -141,7 +142,18 @@ path+=($HOME/Library/Python/3.9/bin) ''; programs.ssh.extraConfig = '' - IdentityAgent /Users/alan/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh + IdentityAgent ~/.strongbox/agent.sock + ''; + home.activation.linkStrongboxSSHAgentSocket = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + if [[ ! -d ~/.strongbox ]] + then + $DRY_RUN_CMD mkdir ~/.strongbox + fi + if [[ ! -S ~/.strongbox/agent.sock ]] + then + $DRY_RUN_CMD ln -s $VERBOSE_ARG \ + ~/Library/Group\ Containers/group.strongbox.mac.mcguill/agent.sock ~/.strongbox/agent.sock + fi ''; # Use GPG from GPGTools -- cgit 1.4.1