From 6ac9d7ea3ad644a4d3a49993158653182cbcacb3 Mon Sep 17 00:00:00 2001 From: Vunny Sodhi Date: Tue, 10 Dec 2024 16:05:20 +0200 Subject: [PATCH] gtklock-userinfo-module: Add custom Icon path With this patch user can set custom image when the system is locked for identification purpose. Signed-off-by: Vunny Sodhi --- modules/desktop/graphics/labwc.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/desktop/graphics/labwc.nix b/modules/desktop/graphics/labwc.nix index 02402bc20..3e52afa10 100644 --- a/modules/desktop/graphics/labwc.nix +++ b/modules/desktop/graphics/labwc.nix @@ -8,6 +8,7 @@ }: let cfg = config.ghaf.graphics.labwc; + userName = config.ghaf.users.accounts.user; in { options.ghaf.graphics.labwc = { @@ -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. @@ -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 [ {