nixos-config/home-manager/modules/gpg/default.nix

35 lines
566 B
Nix
Raw Normal View History

{ pkgs
, config
, lib
, ...
2022-03-01 22:19:03 +01:00
}:
with lib; let
cfg = config.eboskma.programs.gpg;
in
{
2021-11-17 16:32:18 +01:00
options.eboskma.programs.gpg = {
enable = mkEnableOption "enable gpg";
};
2022-05-03 18:17:38 +02:00
config = mkIf cfg.enable {
2021-11-17 16:32:18 +01:00
home.packages = with pkgs; [
2021-11-21 19:07:12 +01:00
pinentry-gnome
2021-11-17 16:32:18 +01:00
];
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
2021-11-21 19:07:12 +01:00
pinentryFlavor = "gnome3";
2021-11-17 16:32:18 +01:00
enableSshSupport = true;
defaultCacheTtlSsh = 14400;
maxCacheTtlSsh = 14400;
extraConfig = ''
allow-loopback-pinentry
'';
2021-11-17 16:32:18 +01:00
};
};
}