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 '';