nix-config/home/gpg.nix

25 lines
454 B
Nix
Raw Normal View History

2021-03-13 01:01:29 +01:00
{ config, lib, ... }:
let
cfg = config.my.home.gpg;
in
{
2021-03-13 01:01:29 +01:00
options.my.home.gpg = with lib.my; {
enable = mkDisableOption "gpg configuration";
};
2021-03-13 01:01:29 +01:00
config = lib.mkIf cfg.enable {
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
enableSshSupport = true; # One agent to rule them all
pinentryFlavor = "tty";
extraConfig = ''
allow-loopback-pinentry
'';
};
};
}