1
0
Fork 0
nix-config/modules/nixos/system/gnupg/default.nix

27 lines
453 B
Nix

{
config,
pkgs,
lib,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.gnupg;
in
{
options.${namespace}.system.gnupg = with types; {
enable = mkBoolOpt false "Whether or not to enable gnupg.";
};
config = mkIf cfg.enable {
services.pcscd.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry;
};
};
}