stylix icon indicating copy to clipboard operation
stylix copied to clipboard

GDM Login photo support

Open bashfulrobot opened this issue 1 year ago • 3 comments

Hi there, I am wondering if:

a) does Stylix support setting the user photo at the login screen, or; b) are there plans to?

Thank you.

bashfulrobot avatar Jul 30 '24 19:07 bashfulrobot

Just for reference, here is my hacky way of doing it currently:

system.activationScripts.script.text = ''
      mkdir -p /var/lib/AccountsService/{icons,users}
      cp ${user-settings.user.home}/dev/nix/nixos/modules/desktops/gnome/.face /var/lib/AccountsService/icons/${user-settings.user.username}
      echo -e "[User]\nIcon=/var/lib/AccountsService/icons/${user-settings.user.username}\n" > /var/lib/AccountsService/users/${user-settings.user.username}
'';

https://github.com/bashfulrobot/nixos/blob/8a84e8ba59df93f8a4bab8881b9c482fdeeae3d3/modules/desktops/gnome/default.nix#L130

What could be neat is if you have a single profile photo setting, and then it configured the above, and placed the .face photo for the login screen.

With that being said, I had discovered the .face method for the lockscreen, but have not tested if the activateScripts method alone would account for the lockscreen as well.

bashfulrobot avatar Jul 30 '24 19:07 bashfulrobot

does Stylix support setting the user photo at the login screen

AFAIK, unless your user photo is your stylix.image, this is currently unsupported.

For reference, Stylix applies stylix.image to services.xserver.displayManager.lightdm.background:

https://github.com/danth/stylix/blob/feb2973dfa8232c07efbd2b48f11a5cfa2276570/modules/lightdm/nixos.nix#L7-L8

are there plans to?

This sounds like a neat feature. However, I think this exceeds the scope of Stylix and should instead be implemented upstream in the appropriate NixOS and Home Manager modules.

trueNAHO avatar Jul 30 '24 19:07 trueNAHO

Yes, I agree this may be more appropriate to implement upstream.

I believe GDM supports setting the user photo through a D-Bus API or something similar, but it's been a while since I used it so I can't remember the details.

danth avatar Jul 30 '24 21:07 danth