From f96bc19bf6c10795c281d2f72338af71cfa64d1d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 7 Apr 2021 17:40:11 +0000 Subject: [PATCH] home: gpg: make pinentry configurable --- home/gpg.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/home/gpg.nix b/home/gpg.nix index 548f90b..d48c200 100644 --- a/home/gpg.nix +++ b/home/gpg.nix @@ -3,8 +3,15 @@ let cfg = config.my.home.gpg; in { - options.my.home.gpg = with lib.my; { - enable = mkDisableOption "gpg configuration"; + options.my.home.gpg = with lib; { + enable = my.mkDisableOption "gpg configuration"; + + pinentry = mkOption { + type = types.str; + default = "tty"; + example = "gtk2"; + description = "Which pinentry interface to use"; + }; }; config = lib.mkIf cfg.enable { @@ -15,7 +22,7 @@ in services.gpg-agent = { enable = true; enableSshSupport = true; # One agent to rule them all - pinentryFlavor = "tty"; + pinentryFlavor = cfg.pinentry; extraConfig = '' allow-loopback-pinentry '';