feat(gpg): Configure gpg & agent

This commit is contained in:
punkfairie 2024-11-11 19:17:47 -08:00
parent 8a260cc6df
commit 59c52220b1
2 changed files with 18 additions and 0 deletions

View file

@ -12,6 +12,7 @@
./fzf.nix
./gh.nix
./git.nix
./gpg.nix
./hyfetch.nix
./just.nix
./lazygit.nix

17
home/programs/gpg.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs, ... }:
{
programs.gpg = {
enable = true;
};
services.gpg-agent = rec {
enable = true;
# TODO: Set this to pinentry-curses on non-GUI systems.
pinentryPackage = pkgs.pinentry-gtk2;
# Don't ask for the password very often.
defaultCacheTtl = 60480000;
maxCacheTtl = defaultCacheTtl;
};
}