summaryrefslogtreecommitdiff
path: root/home/environ/gpg.nix
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-12-03 21:19:39 -0600
committerAlejandro Soto <alejandro@34project.org>2024-12-03 21:49:54 -0600
commit61f3db56410f41d5249c88e44db60d9713dae26d (patch)
tree49c2d5d5e4da331d139cfdc6034c0dba5980271b /home/environ/gpg.nix
parent854f5ee287eb66db5a0713e2f4fac56794e3d735 (diff)
home: big refactor
Diffstat (limited to 'home/environ/gpg.nix')
-rw-r--r--home/environ/gpg.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/home/environ/gpg.nix b/home/environ/gpg.nix
new file mode 100644
index 0000000..dd58181
--- /dev/null
+++ b/home/environ/gpg.nix
@@ -0,0 +1,30 @@
+{ 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;
+
+ pinentryPackage = pkgs.pinentry-gtk2;
+ };
+ };
+}