Skip to content

Commit

Permalink
nixos/gnupg: choose the pinentry variant that has the selected flavor…
Browse files Browse the repository at this point in the history
… definitely enabled
  • Loading branch information
SuperSandro2000 committed Jan 14, 2024
1 parent a880b50 commit 1de7c1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions nixos/modules/programs/gnupg.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ in

config = mkIf cfg.agent.enable {
programs.gnupg.agent.settings = {
pinentry-program = lib.mkIf (cfg.agent.pinentryFlavor != null)
"${pkgs.pinentry.${cfg.agent.pinentryFlavor}}/bin/pinentry";
pinentry-program = lib.mkIf (cfg.agent.pinentryFlavor != null) (lib.getExe pkgs."pinentry-${cfg.agent.pinentryFlavor}");
};

environment.etc."gnupg/gpg-agent.conf".source =
Expand Down
1 change: 1 addition & 0 deletions pkgs/tools/security/pinentry/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ pinentryMkDerivation rec {
Pinentry provides a console and (optional) GTK and Qt GUIs allowing users
to enter a passphrase when `gpg' or `gpg2' is run and needs it.
'';
mainProgram = "pinentry";
maintainers = with maintainers; [ ttuegel fpletz ];
};
}

0 comments on commit 1de7c1d

Please sign in to comment.