nixos/gpg-agent: move pinentry-program to /etc/gnupg/gpg-agent.conf
This commit is contained in:
parent
51fd00925f
commit
8ea644997f
1 changed files with 5 additions and 4 deletions
|
@ -93,6 +93,10 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.agent.enable {
|
config = mkIf cfg.agent.enable {
|
||||||
|
environment.etc."gnupg/gpg-agent.conf".text = ''
|
||||||
|
pinentry-program ${pkgs.pinentry.${cfg.agent.pinentryFlavor}}/bin/pinentry
|
||||||
|
'';
|
||||||
|
|
||||||
# This overrides the systemd user unit shipped with the gnupg package
|
# 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 = mkIf (cfg.agent.pinentryFlavor != null) {
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
|
@ -101,10 +105,7 @@ in
|
||||||
Requires = [ "gpg-agent.socket" ];
|
Requires = [ "gpg-agent.socket" ];
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''
|
ExecStart = "${cfg.package}/bin/gpg-agent --supervised";
|
||||||
${cfg.package}/bin/gpg-agent --supervised \
|
|
||||||
--pinentry-program ${pkgs.pinentry.${cfg.agent.pinentryFlavor}}/bin/pinentry
|
|
||||||
'';
|
|
||||||
ExecReload = "${cfg.package}/bin/gpgconf --reload gpg-agent";
|
ExecReload = "${cfg.package}/bin/gpgconf --reload gpg-agent";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue