29 lines
647 B
Nix
Raw Permalink Normal View History

2024-04-20 09:42:06 -04:00
{
config,
pkgs,
lib,
...
}:
2025-01-20 22:35:40 -05:00
let
cfg = config.nmasur.presets.services.gnupg;
in
2024-04-20 09:42:06 -04:00
{
2022-05-09 22:55:10 -04:00
2025-01-20 22:35:40 -05:00
options.nmasur.presets.services.gnupg.enable = lib.mkEnableOption "GPG encryption tools";
2022-12-21 14:18:03 -07:00
2025-01-20 22:35:40 -05:00
config = lib.mkIf cfg.enable {
2022-05-09 22:55:10 -04:00
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
defaultCacheTtl = 86400; # Resets when used
defaultCacheTtlSsh = 86400; # Resets when used
maxCacheTtl = 34560000; # Can never reset
maxCacheTtlSsh = 34560000; # Can never reset
pinentryFlavor = "tty";
};
2025-01-20 22:35:40 -05:00
home = lib.mkIf config.nmasur.profiles.linux-gui.enable { packages = with pkgs; [ pinentry ]; };
2022-05-09 22:55:10 -04:00
};
}