summaryrefslogtreecommitdiff
path: root/home/environ/gpg.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/environ/gpg.nix')
-rw-r--r--home/environ/gpg.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/home/environ/gpg.nix b/home/environ/gpg.nix
new file mode 100644
index 0000000..a8173b7
--- /dev/null
+++ b/home/environ/gpg.nix
@@ -0,0 +1,37 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+with lib; let
+ cfg = config.local.environ;
+in {
+ config = mkIf cfg.enable {
+ programs.gpg = {
+ enable = true;
+ scdaemonSettings.disable-ccid = true;
+ };
+
+ services.gpg-agent = {
+ enable = true;
+
+ enableBashIntegration = true;
+ enableZshIntegration = true;
+
+ enableExtraSocket = true;
+ enableSshSupport = true;
+
+ defaultCacheTtl = 3600 * 3;
+ defaultCacheTtlSsh = 3600 * 3;
+
+ maxCacheTtl = 3600 * 6;
+ maxCacheTtlSsh = 3600 * 6;
+
+ pinentry = {
+ package = pkgs.pinentry-gtk2;
+ program = "pinentry-gtk-2";
+ };
+ };
+ };
+}