dotfiles/modules/nixos/services/gnupg.nix

26 lines
659 B
Nix
Raw Permalink Normal View History

2024-01-10 04:11:11 +00:00
# GPG is an encryption tool. This isn't really in use for me at the moment.
2024-04-20 13:42:06 +00:00
{
config,
pkgs,
lib,
...
}:
{
2022-05-10 02:55:10 +00:00
2022-12-21 21:18:03 +00:00
options.gpg.enable = lib.mkEnableOption "GnuPG encryption.";
2022-12-21 21:38:34 +00:00
config.home-manager.users.${config.user} = lib.mkIf config.gpg.enable {
2022-05-10 02:55:10 +00: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";
};
2022-05-22 23:43:46 +00:00
home = lib.mkIf config.gui.enable { packages = with pkgs; [ pinentry ]; };
2022-05-10 02:55:10 +00:00
};
}