diff --git a/home/default.nix b/home/default.nix index 3da35b8..bde94a2 100644 --- a/home/default.nix +++ b/home/default.nix @@ -69,5 +69,7 @@ in { fzf.enable = true; + ssh.enable = true; + }; } diff --git a/home/macs.nix b/home/macs.nix index e6bd4e2..cb181da 100644 --- a/home/macs.nix +++ b/home/macs.nix @@ -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"; }; }