Only use secretive ssh auth if on mac

This commit is contained in:
Sam W 2022-03-01 02:05:02 +00:00
parent ab89400f2a
commit 6a64411c0a
2 changed files with 6 additions and 4 deletions

View File

@ -69,5 +69,7 @@ in {
fzf.enable = true;
ssh.enable = true;
};
}

View File

@ -1,7 +1,7 @@
{ ... }: {
home.sessionVariables = {
{ pkgs, lib, ... }: {
# Use secretive for SSH agent
"SSH_AUTH_SOCK" =
"/Users/$USERNAME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
programs.ssh.matchBlocks.all = lib.mkIf pkgs.stdenv.isDarwin {
host = "*";
extraOptions."IdentityAgent" = "~/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
};
}