this post was submitted on 15 Mar 2024
9 points (100.0% liked)

Nix / NixOS

1765 readers
1 users here now

Main links

Videos

founded 1 year ago
MODERATORS
 

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:

services.gnome-keyring = {
  enable = true;
  components = [ "pkcs11" "secrets" "ssh" ];
};
home.sessionVariables.SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/keyring/ssh";

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.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 8 months ago

Thanks! Ive wondered about this too. Now to add to my bastardized sway + gnome setup: https://github.com/coreyoconnor/sway-gnome/blob/main/default.nix