mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-25 21:44:49 +00:00
nixos/gnupg: fix gpg-agent when pinentryFlavor is null
8ea644997f
moved the configuration outside the pinentryFlavor check, causing evaluation to fail when it was set to null.960a5142aa
removed the upstream systemd units, causing gpg-agent.service to be conditional on pinentryFlavor.
This commit is contained in:
parent
3cf96bff20
commit
3d4f3068fd
@ -94,12 +94,13 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.agent.enable {
|
||||
environment.etc."gnupg/gpg-agent.conf".text = ''
|
||||
environment.etc."gnupg/gpg-agent.conf".text =
|
||||
lib.optionalString (cfg.agent.pinentryFlavor != null) ''
|
||||
pinentry-program ${pkgs.pinentry.${cfg.agent.pinentryFlavor}}/bin/pinentry
|
||||
'';
|
||||
|
||||
# This overrides the systemd user unit shipped with the gnupg package
|
||||
systemd.user.services.gpg-agent = mkIf (cfg.agent.pinentryFlavor != null) {
|
||||
systemd.user.services.gpg-agent = {
|
||||
unitConfig = {
|
||||
Description = "GnuPG cryptographic agent and passphrase cache";
|
||||
Documentation = "man:gpg-agent(1)";
|
||||
|
Loading…
Reference in New Issue
Block a user