mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Revert "Merge pull request #71095 from flokli/pinentry-cleanup"
This reverts commit823da4d492
, reversing changes made tob75c8ee3bc
.
This commit is contained in:
parent
823da4d492
commit
2fbccbc728
15 changed files with 88 additions and 141 deletions
|
@ -34,6 +34,7 @@ with lib;
|
|||
networkmanager-openvpn = super.networkmanager-openvpn.override { withGnome = false; };
|
||||
networkmanager-vpnc = super.networkmanager-vpnc.override { withGnome = false; };
|
||||
networkmanager-iodine = super.networkmanager-iodine.override { withGnome = false; };
|
||||
pinentry = super.pinentry.override { gtk2 = null; gcr = null; qt4 = null; qt5 = null; };
|
||||
gobject-introspection = super.gobject-introspection.override { x11Support = false; };
|
||||
}));
|
||||
};
|
||||
|
|
|
@ -120,11 +120,7 @@ in
|
|||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# flavour = "gnome3";
|
||||
# };
|
||||
# programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@ with lib;
|
|||
# Let the user play Rogue on TTY 8 during the installation.
|
||||
#services.rogue.enable = true;
|
||||
|
||||
# Disable some other stuff we don't need.
|
||||
services.udisks2.enable = mkDefault false;
|
||||
|
||||
# Use less privileged nixos user
|
||||
users.users.nixos = {
|
||||
isNormalUser = true;
|
||||
|
|
|
@ -6,19 +6,6 @@ let
|
|||
|
||||
cfg = config.programs.gnupg;
|
||||
|
||||
xserverCfg = config.services.xserver;
|
||||
|
||||
defaultPinentryFlavor =
|
||||
if xserverCfg.desktopManager.lxqt.enable
|
||||
|| xserverCfg.desktopManager.plasma5.enable then
|
||||
"qt"
|
||||
else if xserverCfg.desktopManager.xfce.enable then
|
||||
"gtk2"
|
||||
else if xserverCfg.enable then
|
||||
"gnome3"
|
||||
else
|
||||
null;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -67,20 +54,6 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
agent.pinentryFlavor = mkOption {
|
||||
type = types.nullOr (types.enum pkgs.pinentry.flavors);
|
||||
example = "gnome3";
|
||||
description = ''
|
||||
Which pinentry interface to use. If not null, the path to the
|
||||
pinentry binary will be passed to gpg-agent via commandline and
|
||||
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).
|
||||
'';
|
||||
};
|
||||
|
||||
dirmngr.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
@ -91,16 +64,6 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.agent.enable {
|
||||
programs.gnupg.agent.pinentryFlavor = mkDefault defaultPinentryFlavor;
|
||||
|
||||
# This overrides the systemd user unit shipped with the gnupg package
|
||||
systemd.user.services.gpg-agent = mkIf (cfg.agent.pinentryFlavor != null) {
|
||||
serviceConfig.ExecStart = [ "" ''
|
||||
${pkgs.gnupg}/bin/gpg-agent --supervised \
|
||||
--pinentry-program ${pkgs.pinentry.${cfg.agent.pinentryFlavor}}/bin/pinentry
|
||||
'' ];
|
||||
};
|
||||
|
||||
systemd.user.sockets.gpg-agent = {
|
||||
wantedBy = [ "sockets.target" ];
|
||||
};
|
||||
|
@ -120,7 +83,7 @@ in
|
|||
systemd.user.sockets.dirmngr = mkIf cfg.dirmngr.enable {
|
||||
wantedBy = [ "sockets.target" ];
|
||||
};
|
||||
|
||||
|
||||
environment.systemPackages = with pkgs; [ cfg.package ];
|
||||
systemd.packages = [ cfg.package ];
|
||||
|
||||
|
|
|
@ -34,7 +34,10 @@ with lib;
|
|||
|
||||
services.dbus.packages = [ pkgs.udisks2 ];
|
||||
|
||||
systemd.tmpfiles.rules = [ "d /var/lib/udisks2 0755 root root -" ];
|
||||
system.activationScripts.udisks2 =
|
||||
''
|
||||
mkdir -m 0755 -p /var/lib/udisks2
|
||||
'';
|
||||
|
||||
services.udev.packages = [ pkgs.udisks2 ];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue