From 59c52220b160bcbd435c0db1c7a17eaa95d66d78 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Mon, 11 Nov 2024 19:17:47 -0800 Subject: [PATCH] feat(gpg): Configure gpg & agent --- home/programs/default.nix | 1 + home/programs/gpg.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 home/programs/gpg.nix diff --git a/home/programs/default.nix b/home/programs/default.nix index bfced3c..20c42c6 100644 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -12,6 +12,7 @@ ./fzf.nix ./gh.nix ./git.nix + ./gpg.nix ./hyfetch.nix ./just.nix ./lazygit.nix diff --git a/home/programs/gpg.nix b/home/programs/gpg.nix new file mode 100644 index 0000000..242863b --- /dev/null +++ b/home/programs/gpg.nix @@ -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; + }; +}