{
  pkgs,
  lib,
  config,
  ...
}: let
  program = "gpg";
  cfg = config.dots.${program};
  #sec = sops.secrets;
in {
  options.dots.${program} = {
    enable = lib.mkEnableOption "enables ${program}";
  };

  config = lib.mkIf cfg.enable {
    programs.${program} = {
      enable = true;
    };
    services.gpg-agent = {
      enable = true;
      enableSshSupport = true;
      pinentry.package = pkgs.pinentry-qt;
      pinentry.program = "pinentry-qt";
    };
    # install pinentry programs conditionaly based on os
    home.packages =
      lib.optional pkgs.stdenv.isDarwin pkgs.pinentry_mac
      ++ lib.optional pkgs.stdenv.isLinux pkgs.pinentry-qt;
  };
}
