2021-03-13 01:01:29 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.my.home.gpg;
|
|
|
|
in
|
2021-02-21 19:43:33 +01:00
|
|
|
{
|
2021-03-13 01:01:29 +01:00
|
|
|
options.my.home.gpg = with lib.my; {
|
|
|
|
enable = mkDisableOption "gpg configuration";
|
2021-02-21 19:43:33 +01:00
|
|
|
};
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
};
|
2021-02-21 19:43:33 +01:00
|
|
|
};
|
|
|
|
}
|