-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
Module Name
home-environment.nix
Requested Feature
Enable homemanager to manage user profile pictures.
I currently if have this in my configuration, but I would like to see this feature upstreamed. I am not very familiar with the inner workings of homemanager, so I am not sure if this is the right approach:
{
config,
lib,
pkgs,
...
}:
{
options.home.usericon = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = "Path to the user's profile picture.";
};
config = lib.mkIf (config.home.usericon != null && pkgs.stdenv.isLinux) {
home.activation.configureUserIcon = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
if [ -z "''${DRY_RUN:-}" ]; then
${pkgs.systemd}/bin/busctl call \
org.freedesktop.Accounts \
/org/freedesktop/Accounts/User$UID \
org.freedesktop.Accounts.User \
SetIconFile \
s "${config.home.usericon}"
fi
'';
};
}
Current Limitations
Currently, homemanager cannot set the user profile picture.
Additional Context
No response