From 718a2f662d1c1c1951ef5795ae1b5c4f9b75c1f0 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Mon, 20 Mar 2023 15:24:56 -0600 Subject: home/gpg: initial commit --- home/default.nix | 1 + home/gpg.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 home/gpg.nix diff --git a/home/default.nix b/home/default.nix index 3347764..0a87630 100644 --- a/home/default.nix +++ b/home/default.nix @@ -4,6 +4,7 @@ with lib; { ./desktop.nix ./environ.nix ./git.nix + ./gpg.nix ./graphics.nix ./isolation.nix ./mail diff --git a/home/gpg.nix b/home/gpg.nix new file mode 100644 index 0000000..134c49f --- /dev/null +++ b/home/gpg.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: +with lib; { + config = { + programs.gpg = mkIf (!config.home.isolation.active) { + enable = true; + }; + + services.gpg-agent = mkIf (!config.home.isolation.active) { + enable = true; + + enableBashIntegration = true; + enableZshIntegration = true; + + enableExtraSocket = true; + enableSshSupport = true; + + defaultCacheTtl = 7200; + defaultCacheTtlSsh = 7200; + + maxCacheTtl = 21600; + maxCacheTtlSsh = 21600; + + pinentryFlavor = "gtk2"; + }; + }; +} -- cgit v1.2.3