mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-31 05:12:02 +00:00
29 lines
647 B
Nix
29 lines
647 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.nmasur.presets.services.gnupg;
|
|
in
|
|
|
|
{
|
|
|
|
options.nmasur.presets.services.gnupg.enable = lib.mkEnableOption "GPG encryption tools";
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
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";
|
|
};
|
|
home = lib.mkIf config.nmasur.profiles.linux-gui.enable { packages = with pkgs; [ pinentry ]; };
|
|
};
|
|
}
|