fix(user): fix profile icon installation
This commit is contained in:
parent
5a05307783
commit
f35eaa1304
Binary file not shown.
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 114 KiB |
|
@ -144,6 +144,26 @@ in {
|
||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
}) cfg.profiles;
|
}) cfg.profiles;
|
||||||
|
|
||||||
|
system.activationScripts = mapAttrs'
|
||||||
|
(name: opts: nameValuePair
|
||||||
|
"${name}-profile-icon"
|
||||||
|
{
|
||||||
|
deps = [ "users" ];
|
||||||
|
text = let
|
||||||
|
iconDest = "/var/lib/AccountsService/icons/${name}";
|
||||||
|
userConf = pkgs.writeText "${name}-config" ''
|
||||||
|
[User]
|
||||||
|
Session=
|
||||||
|
Icon=${iconDest}
|
||||||
|
SystemAccount=false
|
||||||
|
'';
|
||||||
|
in ''
|
||||||
|
install -Dm 0444 ${opts.picture} ${iconDest}
|
||||||
|
install -Dm 0400 ${userConf} /var/lib/AccountsService/users/${name}
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
(filterAttrs (n: _: n != "root") config.users.profiles);
|
||||||
|
|
||||||
# set up standard persistence for users
|
# set up standard persistence for users
|
||||||
# this is registered internally for each software's configuration
|
# this is registered internally for each software's configuration
|
||||||
environment.persistence."/nix/persist" = {
|
environment.persistence."/nix/persist" = {
|
||||||
|
|
Loading…
Reference in a new issue