gnupg: disable gui/pinentry support by default

This solves the dependency cycle in gcr alternatively so there won't be
two gnupg store paths in a standard NixOS system which has udisks2 enabled
by default.

NixOS users are expected to use the gpg-agent user service to pull in the
appropriate pinentry flavour or install it on their systemPackages and set
it in their local gnupg agent config instead.

Co-authored-by: Florian Klink <flokli@flokli.de>

Changed files
+16 -11
nixos
doc
manual
release-notes
modules
programs
pkgs
development
libraries
tools
security
gnupg
top-level
+8 -1
nixos/doc/manual/release-notes/rl-2003.xml
···
<itemizedlist>
<listitem>
-
<para />
</listitem>
</itemizedlist>
</section>
···
<itemizedlist>
<listitem>
+
<para>
+
GnuPG is now built without support for a graphical passphrase entry
+
by default. Please enable the <literal>gpg-agent</literal> user service
+
via the NixOS option <literal>programs.gnupg.agent.enable</literal>.
+
Note that upstream recommends using <literal>gpg-agent</literal> and
+
will spawn a <literal>gpg-agent</literal> on the first invocation of
+
GnuPG anyway.
+
</para>
</listitem>
</itemizedlist>
</section>
+1 -1
nixos/modules/programs/gnupg.nix
···
thus overrides the pinentry option in gpg-agent.conf in the user's
home directory.
If not set at all, it'll pick an appropriate flavor depending on the
-
system configuration (qt3 flavor for lxqt and plasma5, gtk2 for xfce
4.12, gnome3 on all other systems with X enabled, ncurses otherwise).
'';
};
···
thus overrides the pinentry option in gpg-agent.conf in the user's
home directory.
If not set at all, it'll pick an appropriate flavor depending on the
+
system configuration (qt flavor for lxqt and plasma5, gtk2 for xfce
4.12, gnome3 on all other systems with X enabled, ncurses otherwise).
'';
};
+1 -5
pkgs/development/libraries/gcr/default.nix
···
nativeBuildInputs = [ pkgconfig gettext gobject-introspection libxslt makeWrapper vala ];
-
buildInputs = let
-
gpg = gnupg.override { guiSupport = false; }; # prevent build cycle with pinentry_gnome
-
in [
-
gpg libgcrypt libtasn1 dbus-glib pango gdk-pixbuf atk
-
];
propagatedBuildInputs = [ glib gtk3 p11-kit ];
···
nativeBuildInputs = [ pkgconfig gettext gobject-introspection libxslt makeWrapper vala ];
+
buildInputs = [ gnupg libgcrypt libtasn1 dbus-glib pango gdk-pixbuf atk ];
propagatedBuildInputs = [ glib gtk3 p11-kit ];
+1 -1
pkgs/tools/security/gnupg/20.nix
···
# Each of the dependencies below are optional.
# Gnupg can be built without them at the cost of reduced functionality.
-
, pinentry ? null, guiSupport ? true
, openldap ? null, bzip2 ? null, libusb ? null, curl ? null
}:
···
# Each of the dependencies below are optional.
# Gnupg can be built without them at the cost of reduced functionality.
+
, pinentry ? null, guiSupport ? false
, openldap ? null, bzip2 ? null, libusb ? null, curl ? null
}:
+1 -1
pkgs/tools/security/gnupg/22.nix
···
# Each of the dependencies below are optional.
# Gnupg can be built without them at the cost of reduced functionality.
-
, pinentry ? null, guiSupport ? true
, adns ? null, gnutls ? null, libusb ? null, openldap ? null
, readline ? null, zlib ? null, bzip2 ? null
}:
···
# Each of the dependencies below are optional.
# Gnupg can be built without them at the cost of reduced functionality.
+
, pinentry ? null, guiSupport ? false
, adns ? null, gnutls ? null, libusb ? null, openldap ? null
, readline ? null, zlib ? null, bzip2 ? null
}:
+4 -2
pkgs/top-level/all-packages.nix
···
gnupg1compat = callPackage ../tools/security/gnupg/1compat.nix { };
gnupg1 = gnupg1compat; # use config.packageOverrides if you prefer original gnupg1
gnupg20 = callPackage ../tools/security/gnupg/20.nix {
-
pinentry = if stdenv.isDarwin then pinentry_mac else pinentry;
};
gnupg22 = callPackage ../tools/security/gnupg/22.nix {
-
pinentry = if stdenv.isDarwin then pinentry_mac else pinentry;
};
gnupg = gnupg22;
···
gnupg1compat = callPackage ../tools/security/gnupg/1compat.nix { };
gnupg1 = gnupg1compat; # use config.packageOverrides if you prefer original gnupg1
gnupg20 = callPackage ../tools/security/gnupg/20.nix {
+
guiSupport = stdenv.isDarwin;
+
pinentry = if stdenv.isDarwin then pinentry_mac else pinentry_gtk2;
};
gnupg22 = callPackage ../tools/security/gnupg/22.nix {
+
guiSupport = stdenv.isDarwin;
+
pinentry = if stdenv.isDarwin then pinentry_mac else pinentry_gtk2;
};
gnupg = gnupg22;