diff --git a/nixos/modules/services/desktops/gnome3/gnome-keyring.nix b/nixos/modules/services/desktops/gnome3/gnome-keyring.nix index 4c350d8bb1c6..db60445ef773 100644 --- a/nixos/modules/services/desktops/gnome3/gnome-keyring.nix +++ b/nixos/modules/services/desktops/gnome3/gnome-keyring.nix @@ -37,6 +37,11 @@ with lib; security.pam.services.login.enableGnomeKeyring = true; + security.wrappers.gnome-keyring-daemon = { + source = "${pkgs.gnome3.gnome-keyring}/bin/gnome-keyring-daemon"; + capabilities = "cap_ipc_lock=ep"; + }; + }; } diff --git a/pkgs/desktops/gnome-3/core/gnome-keyring/default.nix b/pkgs/desktops/gnome-3/core/gnome-keyring/default.nix index 9702087ca0d0..f36d3f4a6e0a 100644 --- a/pkgs/desktops/gnome-3/core/gnome-keyring/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-keyring/default.nix @@ -46,6 +46,16 @@ stdenv.mkDerivation rec { make check ''; + # Use wrapped gnome-keyring-daemon with cap_ipc_lock=ep + postFixup = '' + files=($out/etc/xdg/autostart/* $out/share/dbus-1/services/*) + + for file in ''${files[*]}; do + substituteInPlace $file \ + --replace "$out/bin/gnome-keyring-daemon" "/run/wrappers/bin/gnome-keyring-daemon" + done + ''; + passthru = { updateScript = gnome3.updateScript { packageName = "gnome-keyring";