nixos/homeConfig/modules/gpg/default.nix
2024-01-28 07:41:34 -05:00

22 lines
410 B
Nix

{ lib, config, ... }:
with lib;
let
cfg = config.modules.gpg;
in
{ options.modules.gpg = { enable = mkEnableOption "gpg"; };
config = mkIf cfg.enable {
programs.gpg = {
enable = true;
publicKeys = [ config.user.pgpKey ];
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
enableBashIntegration = true;
pinentryFlavor = "tty";
};
};
}