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

35 lines
581 B
Nix
Raw Permalink Normal View History

2024-02-05 11:46:52 +01:00
{
pkgs,
config,
lib,
...
2022-03-01 22:19:03 +01:00
}:
2024-02-05 11:46:52 +01:00
with lib;
let
2022-03-01 22:19:03 +01:00
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 {
2024-03-16 22:38:43 +01:00
home.packages = with pkgs; [ pinentry-gnome3 ];
2021-11-17 16:32:18 +01:00
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
2024-03-16 22:38:43 +01:00
pinentryPackage = pkgs.pinentry-gnome3;
# enableSshSupport = true;
# defaultCacheTtlSsh = 14400;
# maxCacheTtlSsh = 14400;
extraConfig = ''
allow-loopback-pinentry
'';
2021-11-17 16:32:18 +01:00
};
};
}