It took me some time to work out how to get my ssh agent set up in Niri so I though I would share what I did. I'm using NixOS and Home Manager. I put this in my Home Manager config:
I'm using GDM according to NixOS' default configuration which I think runs gnome-keyring (I thought I saw it in the process list before I set up the user unit), and I think that configuration is automatically unlocking gnome-keyring when I log in via PAM integration. But apparently I need to run gnome-keyring again in my window manager session. Home Manager's services.gnome-keyring adds a systemd user unit that does that.
It took me a while to figure this out. I use Home Manager to manage my Gnome settings by setting dconf.settings = { ... }. My settings are non-trivial (for example my paperwm module). So it's helpful for me to check the actual dconf settings that Home Manager produces.
To do that build your configuration with home-manager build, open result/activate, and find a line that looks like this: