NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.53k stars 13.02k forks source link

Allow unlocking of keyring from greetd #246197

Closed b-m-f closed 8 months ago

b-m-f commented 11 months ago

Both LightDM and GDM include the login module where a keyring can be unlocked, for example by setting security.pam.services.login.enableGnomeKeyring = true;.

I suggest adding the following:


text = ''
auth      substack      login
account   include       login
password  substack      login
session   include       login
'';

to https://github.com/NixOS/nixpkgs/blob/d3a6adc9b6f11e260da168714ad8dcc938621610/nixos/modules/services/display-managers/greetd.nix#L59

and maybe hide them behind a boolean?

Maybe someone with more knowledge of the PAM system could give some feedback on this, as I am not sure if there could be negative or unforeseen consequences lurking.

b-m-f commented 11 months ago

@luc65r, you are mentioned as the maintainer so I tought I ping you on this :)

Aleksanaa commented 11 months ago

You can use security.pam.services.greetd.enableGnomeKeyring = true. But yeah a template for all those login managers makes sense.

fazo96 commented 11 months ago

I have had success with security.pam.services.greetd.enableGnomeKeyring = true

pluiedev commented 8 months ago

security.pam.services.greetd.enableGnomeKeyring = true works just fine for me, although IMO forcing people to do this manually is quite dumb — I would propose to enable this if services.gnome.gnome-keyring.enable is set to true.

EDIT: Made a quick PR to fix this as it is literally just one line

martijnboers commented 3 weeks ago

Still cannot get this to work for the live of me. I'm using Hyprland with greetd but my default keyring remains locked on boot. My config hyprland.nix