summaryrefslogtreecommitdiff
path: root/home/gpg.nix
blob: 377beb7a4d3d2ef488bd936ecd44ab47993de39b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ config, lib, pkgs, ... }:
with lib; {
  config = mkIf (!config.home.isolation.active) {
    programs.gpg = {
      enable = true;
      scdaemonSettings.disable-ccid = true;
    };

    services.gpg-agent = {
      enable = true;

      enableBashIntegration = true;
      enableZshIntegration = true;

      enableExtraSocket = true;
      enableSshSupport = true;

      defaultCacheTtl = 7200;
      defaultCacheTtlSsh = 7200;

      maxCacheTtl = 21600;
      maxCacheTtlSsh = 21600;

      pinentryFlavor = "gtk2";
    };
  };
}