nix-config/home/modules/gpg.nix
2024-06-01 21:47:32 +02:00

32 lines
657 B
Nix

{ config
, lib
, ...
}:
with lib; let
cfg = config.dadada.home.gpg;
in
{
options.dadada.home.gpg = {
enable = mkEnableOption "Enable GnuPG config";
};
config = mkIf cfg.enable {
programs.gpg = {
enable = true;
settings = {
fixed-list-mode = true;
keyid-format = "0xlong";
verify-options = "show-uid-validity";
list-options = "show-uid-validity";
cert-digest-algo = "SHA256";
use-agent = true;
keyserver = "hkps://keys.openpgp.org";
};
};
services.gpg-agent = {
enable = true;
defaultCacheTtl = 1800;
enableSshSupport = false;
};
};
}