summaryrefslogtreecommitdiff
path: root/home/gpg.nix
blob: 134c49f9fef696b9fc105c6d54ed00606c52c71a (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
{ config, lib, pkgs, ... }:
with lib; {
  config = {
    programs.gpg = mkIf (!config.home.isolation.active) {
      enable = true;
    };

    services.gpg-agent = mkIf (!config.home.isolation.active) {
      enable = true;

      enableBashIntegration = true;
      enableZshIntegration = true;

      enableExtraSocket = true;
      enableSshSupport = true;

      defaultCacheTtl = 7200;
      defaultCacheTtlSsh = 7200;

      maxCacheTtl = 21600;
      maxCacheTtlSsh = 21600;

      pinentryFlavor = "gtk2";
    };
  };
}