mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
gpg-agent: fix GnuPG by adding pinentry flavor option
See https://github.com/NixOS/nixpkgs/pull/71095. Fixes #908
This commit is contained in:
parent
7c30831e8f
commit
ebf1df58da
1 changed files with 23 additions and 0 deletions
|
@ -129,6 +129,26 @@ in
|
||||||
configuration file.
|
configuration file.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pinentryFlavor = mkOption {
|
||||||
|
type = types.nullOr (types.enum pkgs.pinentry.flavors);
|
||||||
|
example = "gnome3";
|
||||||
|
default = "gtk2";
|
||||||
|
description = ''
|
||||||
|
Which pinentry interface to use. If not
|
||||||
|
<literal>null</literal>, it sets
|
||||||
|
<option>pinentry-program</option> in
|
||||||
|
<filename>gpg-agent.conf</filename>. Beware that
|
||||||
|
<literal>pinentry-gnome3</literal> may not work on non-Gnome
|
||||||
|
systems. You can fix it by adding the following to your
|
||||||
|
system configuration:
|
||||||
|
<programlisting language="nix">
|
||||||
|
services.dbus.packages = [ pkgs.gcr ];
|
||||||
|
</programlisting>
|
||||||
|
For this reason, the default is <literal>gtk2</literal> for
|
||||||
|
now.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -153,6 +173,9 @@ in
|
||||||
optional (cfg.maxCacheTtlSsh != null)
|
optional (cfg.maxCacheTtlSsh != null)
|
||||||
"max-cache-ttl-ssh ${toString cfg.maxCacheTtlSsh}"
|
"max-cache-ttl-ssh ${toString cfg.maxCacheTtlSsh}"
|
||||||
++
|
++
|
||||||
|
optional (cfg.pinentryFlavor != null)
|
||||||
|
"pinentry-program ${pkgs.pinentry.${cfg.pinentryFlavor}}/bin/pinentry"
|
||||||
|
++
|
||||||
[ cfg.extraConfig ]
|
[ cfg.extraConfig ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue