greenhouse

kore

my public infrastructure monorepo

git clone [email protected]:kore.git

kore / home / features / cli / gpg.nix25 lines · 524B · raw

1{ pkgs, config, lib, ... }:
2
3{
4  services.gpg-agent = {
5    enable = true;
6    enableSshSupport = true;
7
8    pinentryPackage = pkgs.pinentry-curses;
9  };
10
11  programs = {
12    gpg =  {
13      enable = true;
14      settings.trust-model = "tofu+pgp";
15      scdaemonSettings.disable-ccid = true;
16    };
17
18    bash.initExtra = ''
19      export GPG_TTY="$(tty)"
20      export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
21      gpgconf --launch gpg-agent
22      gpg-connect-agent UPDATESTARTUPTTY /bye > /dev/null
23    '';
24  };
25}