about summary refs log tree commit diff stats
path: root/hm/soispha/conf/gpg/default.nix
blob: 9a7820f38ead500bd34060349bda59d8eeda1568 (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
25
26
27
28
29
30
31
32
{
  config,
  pkgs,
  ...
}: {
  programs.gpg = {
    enable = true;
    homedir = "${config.xdg.dataHome}/gnupg";
    mutableKeys = true;
    mutableTrust = true;

    settings = {
      default-key = "Benedikt Peetz <benedikt.peetz@b-peetz.de>";
      # TODO: add more
    };

    publicKeys = [
      {
        source = ./keys/key_2;
        trust = "full";
      }
    ];
  };
  services = {
    gpg-agent = {
      enable = true;
      enableZshIntegration = true;
      enableScDaemon = true; # smartcards and such things
      pinentryPackage = pkgs.pinentry-tty;
    };
  };
}