Skip to content

Commit

Permalink
gtklock-userinfo-module: Add custom Icon path
Browse files Browse the repository at this point in the history
With this patch user can set custom image when the
system is locked for identification purpose.

Signed-off-by: Vunny Sodhi <[email protected]>
  • Loading branch information
vunnyso authored and brianmcgillion committed Dec 11, 2024
1 parent fa8526d commit 6ac9d7e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/desktop/graphics/labwc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
}:
let
cfg = config.ghaf.graphics.labwc;
userName = config.ghaf.users.accounts.user;
in
{
options.ghaf.graphics.labwc = {
Expand All @@ -26,7 +27,7 @@ in
};
autologinUser = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = config.ghaf.users.accounts.user;
default = userName;
description = ''
Username of the account that will be automatically logged in to the desktop.
If unspecified, the login manager is shown as usual.
Expand Down Expand Up @@ -190,6 +191,11 @@ in

# DBus service for accessing the list of user accounts and information attached to those accounts
services.accounts-daemon.enable = true;
# We can explicitly specify the icon path, using which user can set custom image when system is locked
system.activationScripts.userIcon.text = ''
mkdir -p /var/lib/AccountsService/users
echo -e "[User]\nIcon=/home/${userName}/Pictures/.face\n" > /var/lib/AccountsService/users/${userName}
'';

ghaf.graphics.launchers = lib.mkIf config.ghaf.profiles.debug.enable [
{
Expand Down

0 comments on commit 6ac9d7e

Please sign in to comment.