Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions modules/services/gpg-agent.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,24 @@ in
configuration file.
'';
};

pinentryFlavor = mkOption {
type = types.nullOr (types.enum pkgs.pinentry.flavors);
example = "gnome3";
default = "gtk2";
description = ''
Which pinentry interface to use. If not null, it sets
pinentry-program in <literal>gpg-agent.conf</literal>.
Beware that <literal>pinentry-gnome3</literal> doesn't work
great on non-gnome systems. You can fix it by adding the
following to your system config:
<literal>
services.dbus.packages = [ pkgs.gcr ];
</literal>
For this reason, the default is gtk2 for now, but there are
plans to make this default smarter.
'';
};
};
};

Expand All @@ -153,6 +171,9 @@ in
optional (cfg.maxCacheTtlSsh != null)
"max-cache-ttl-ssh ${toString cfg.maxCacheTtlSsh}"
++
optional (cfg.pinentryFlavor != null)
"pinentry-program ${pkgs.pinentry.${cfg.pinentryFlavor}}/bin/pinentry"
++
[ cfg.extraConfig ]
);

Expand Down