From c2a9e5d4fde55b51e194efc368df79e8146e614b Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Mon, 26 Oct 2026 13:56:20 -0700 Subject: [PATCH] [hyprland] Fix system keyring --- home-manager/features/hypr/hyprland.nix | 4 ++++ home-manager/features/linux-desktop.nix | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/home-manager/features/hypr/hyprland.nix b/home-manager/features/hypr/hyprland.nix index 28efbe0..733b115 100644 --- a/home-manager/features/hypr/hyprland.nix +++ b/home-manager/features/hypr/hyprland.nix @@ -111,6 +111,10 @@ export HYPRCURSOR_SIZE="32" export HYPRCURSOR_THEME="phinger" + # Point SSH (and anything else that uses the ssh-agent protocol) at + # gnome-keyring's ssh-agent component instead of spawning a separate agent. + export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/keyring/ssh" + # Nvidia config export LIBVA_DRIVER_NAME="nvidia" export __GLX_VENDOR_LIBRARY_NAME="nvidia" diff --git a/home-manager/features/linux-desktop.nix b/home-manager/features/linux-desktop.nix index 72f32c7..63d5ffb 100644 --- a/home-manager/features/linux-desktop.nix +++ b/home-manager/features/linux-desktop.nix @@ -1,5 +1,6 @@ { config, + lib, pkgs, ... }: @@ -69,6 +70,17 @@ in chromium.enable = true; }; + services = { + # Secret management: unlocks on login (see security.pam.*.enableGnomeKeyring at + # the system level) and provides the org.freedesktop.secrets D-Bus API plus an + # ssh-agent component. + gnome-keyring.enable = true; + + # gnome-keyring's ssh-agent could be used in place of the plain one. + # Un-comment this if I'd rather use the system keyring instead of the ssh-agent. + # ssh-agent.enable = lib.mkForce false; + }; + # GTK settings gtk = { enable = true;