diff --git a/defaults/desktop/desktop-environment.nix b/defaults/desktop/desktop-environment.nix index cfebc0a..fd3b8c5 100644 --- a/defaults/desktop/desktop-environment.nix +++ b/defaults/desktop/desktop-environment.nix @@ -14,7 +14,7 @@ in { xfce.thunar xfce.thunar-archive-plugin xfce.xfce4-appfinder # xfce.thunar-volman # needed? - pinentry-gtk2 # Required by gnupg + pinentry-rofi # Required by gnupg qt5.qtwayland # Required for qt applications ]; environment.sessionVariables.NIXOS_OZONE_WL = "1"; diff --git a/home/fhauser/applications/gpg.nix b/home/fhauser/applications/gpg.nix index 69e466e..753925d 100644 --- a/home/fhauser/applications/gpg.nix +++ b/home/fhauser/applications/gpg.nix @@ -35,6 +35,18 @@ enableScDaemon = true; enableSshSupport = true; enableExtraSocket = true; + pinentryFlavor = null; + extraConfig = let + pinentryBemenu = pkgs.writeShellApplication { + name = "pinentry-bemenu-with-env"; + text = '' + PATH="$PATH:${pkgs.coreutils}/bin:${pkgs.bemenu}/bin" + "${pkgs.pinentry-bemenu}/bin/pinentry-bemenu" "$@" + ''; + }; + in '' + pinentry-program ${pinentryBemenu}/bin/pinentry-bemenu-with-env + ''; sshKeys = [ "99DFB0F28CF9420A2D6383139E86814A1568C81B" # 0x8193A5D218B553DD / fabian.hauser@threema.ch "638143D3F6421377E9D4C7F1D2EDC5AA0A860351" # 0x3E957C9C8CB5D6B2 / fabian.hauser@qo.is