The Complete Computing Environment

GnuPG Configuration

LifeTechEmacsTopicsArcology

I use gpg2 everywhere, including in Emacs.

(provide 'cce/gnupg)
(setq epg-gpg-program "gpg2")

nix

This is for home-manager:

{pkgs, ...}:
{
  programs.gpg.enable = true;
  programs.gpg.settings = {
    # default-key = "a5fce951";
    cert-policy-url = "http://whatthefuck.computer/new-key.txt";
    auto-key-locate = "keyserver cert pka";
    keyserver = "hkp://pool.sks-keyservers.net";
    keyid-format = "0xlong";
  };

  services.gpg-agent.enable = true;
  services.gpg-agent.enableScDaemon = true;
  services.gpg-agent.enableSshSupport = true;
  services.gpg-agent.defaultCacheTtl = 43200;

  services.gpg-agent.pinentryFlavor = "qt";
}

This is for PAM in My NixOS configuration:

{ pkgs, ... }:
{
  environment.systemPackages = [ pkgs.gnupg ];
  security.pam.services.login.gnupg.enable = true;
}