diff --git a/users/profiles/gpg.nix b/users/profiles/gpg.nix index 1333ca0..3242c4b 100644 --- a/users/profiles/gpg.nix +++ b/users/profiles/gpg.nix @@ -1,4 +1,4 @@ -{ config, ... }: { +{ config, main, ... }: { programs.gpg = { enable = true; homedir = "${config.xdg.dataHome}/gnupg"; @@ -7,6 +7,10 @@ services.gpg-agent = { enable = true; enableSshSupport = true; - pinentryFlavor = "qt"; + pinentryFlavor = (if main.services.xserver.enable then "qt" else "curses"); + extraConfig = '' + allow-emacs-pinentry + allow-loopback-pinentry + ''; }; }