Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure user avatar #445

Open
tye-exe opened this issue Dec 26, 2024 · 1 comment
Open

Configure user avatar #445

tye-exe opened this issue Dec 26, 2024 · 1 comment

Comments

@tye-exe
Copy link

tye-exe commented Dec 26, 2024

I would love for plasma-manager to have an option for setting the user avatar. It's not the highest priority, but it's just a nice addition.

After a small bit of research & testing (credit to this post https://superuser.com/a/1772789), the user avatar is stored at /var/lib/AccountsService/icons/<username> as a 256x256 PNG file (with no file extension).

I'm not sure how this would be implemented in a reproducible fashion, unless a hash for the PNG file could be used to check against (similar to how nixpkgs works). Furthermore, i don't have any experience with the plasma-manager code-base, but i would be happy to give implementation a go if i am pointed in the correct direction.

@sidmoreoss
Copy link
Contributor

sidmoreoss commented Dec 28, 2024

Here's an example of how you can add a custom option like user.user.[userName].icon directly to your NixOS configuration:
GitLab Example - User Icon

This demonstrates how to extend the NixOS module system to include custom options. In this case, it shows how to define a icon setting within the user configuration. You can use this approach to add similar features to your repository, making it easier to manage custom options directly in your NixOS setup.

Refer this https://gitlab.com/lazylinux/nixos/-/blob/master/modules/users/default.nix?ref_type=heads for usage example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants