1{ lib, config, ... }:
2let
3 cfg = config.py.services.gpg-agent;
4in
5{
6 options.py.services.gpg-agent.enable = lib.mkEnableOption "gpg-agent";
7 config.services.gpg-agent = lib.mkIf cfg.enable {
8 enable = true;
9 enableExtraSocket = true;
10 enableScDaemon = true;
11 enableSshSupport = true;
12 defaultCacheTtl = 600;
13 maxCacheTtl = 600;
14 sshKeys = [
15 # My Normal GPG Key(Authentication Subkey)
16 "485329FEF73C42C6C42879F66C8B971F3FD4A132"
17 "CFEFCD08CFE6F0849F32ABC9C5CF3158A2FE1392"
18 ];
19 extraConfig = ''
20 ttyname $GPG_TTY
21 max-cache-ttl-ssh 600
22 '';
23 };
24}