Skip to content

Commit

Permalink
gpg-agent: no-allow-external-cache option
Browse files Browse the repository at this point in the history
This is a pretty common configuration option, and one that many people
will find useful to discover, specially if they're not using a window
manager.

I thought I would add it. It is also useful to have for
pass-secret-service in the future, since you'd likely want to avoid DE
keyrings.

Signed-off-by: Christina Sørensen <[email protected]>
  • Loading branch information
cafkafk committed Jan 31, 2025
1 parent a815919 commit f5bd1a6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions modules/services/gpg-agent.nix
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,21 @@ in {
'';
};

noAllowExternalCache = mkOption {
type = types.bool;
default = false;
description = ''
Tell Pinentry not to enable features which use an external cache for
passphrases.
Some desktop environments prefer to unlock all credentials with one
master password and may have installed a Pinentry which employs an
additional external cache to implement such a policy. By using this
option the Pinentry is advised not to make use of such a cache and
instead always ask the user for the requested passphrase.
'';
};

extraConfig = mkOption {
type = types.lines;
default = "";
Expand Down Expand Up @@ -269,6 +284,7 @@ in {
(optional (cfg.enableSshSupport) "enable-ssh-support"
++ optional cfg.grabKeyboardAndMouse "grab"
++ optional (!cfg.enableScDaemon) "disable-scdaemon"
++ optional (cfg.noAllowExternalCache) "no-allow-external-cache"
++ optional (cfg.defaultCacheTtl != null)
"default-cache-ttl ${toString cfg.defaultCacheTtl}"
++ optional (cfg.defaultCacheTtlSsh != null)
Expand Down

0 comments on commit f5bd1a6

Please sign in to comment.