blob: 8954c7b8288505ef560fed5a5cdc95461d8e42c2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
{
config,
lib,
...
}: {
programs.gpg = {
enable = true;
homedir = "${config.xdg.dataHome}/gnupg";
};
services.gpg-agent = {
enable = true;
defaultCacheTtl = 60 * 5;
defaultCacheTtlSsh = 60 * 5;
pinentryFlavor = "gtk2";
enableSshSupport = true;
sshKeys = ["4077454831C98FE4BE4A9C167186C5A63615B790"];
};
programs.zsh.initExtraFirst = lib.mkBefore ''
current_tty="$(tty)"
tty() { echo "$current_tty"; }
SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpg-connect-agent /bye
'';
}
|