mirror of
https://github.com/Cian-H/My_NixOS_Config.git
synced 2025-12-22 23:11:57 +00:00
Switched profile appearance management from activation script to systemd service
This is to fix an issue i found with activation scripts not really playing nicely with UWSM
This commit is contained in:
@@ -127,19 +127,6 @@
|
|||||||
extraGroups = ["networkmanager" "wheel" "libvirtd"];
|
extraGroups = ["networkmanager" "wheel" "libvirtd"];
|
||||||
shell = unstablePkgs.nushell;
|
shell = unstablePkgs.nushell;
|
||||||
};
|
};
|
||||||
# # The hack below sets the user profile image declaratively
|
|
||||||
system.activationScripts.script.text = ''
|
|
||||||
mkdir -p /var/lib/AccountsService/{icons,users}
|
|
||||||
cp /home/cianh/Pictures/face.png /var/lib/AccountsService/icons/cianh
|
|
||||||
echo "[User]
|
|
||||||
Session=
|
|
||||||
Icon=/var/lib/AccountsService/icons/cianh
|
|
||||||
SystemAccount=false" > /var/lib/AccountsService/users/cianh
|
|
||||||
chown root:root /var/lib/AccountsService/users/cianh
|
|
||||||
chmod 0600 /var/lib/AccountsService/users/cianh
|
|
||||||
chown root:root /var/lib/AccountsService/icons/cianh
|
|
||||||
chmod 0444 /var/lib/AccountsService/icons/cianh
|
|
||||||
'';
|
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -39,13 +39,34 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Add custom services
|
# Add custom services
|
||||||
systemd.services.pueued = {
|
systemd.services = {
|
||||||
enable = true;
|
setup-user-icon = {
|
||||||
description = "Pueue Daemon - CLI process scheduler and manager";
|
description = "Set user profile icon";
|
||||||
wantedBy = ["default.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
serviceConfig = {
|
after = ["home.mount"];
|
||||||
Restart = "no";
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.pueue.outPath}/bin/pueued -vv";
|
Type = "oneshot";
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.bash}/bin/bash -c " \
|
||||||
|
mkdir -p /var/lib/AccountsService/{icons,users} && \
|
||||||
|
cp /home/cianh/Pictures/face.png /var/lib/AccountsService/icons/cianh && \
|
||||||
|
echo '[User]\nSession=\nIcon=/var/lib/AccountsService/icons/cianh\nSystemAccount=false' > /var/lib/AccountsService/users/cianh && \
|
||||||
|
chown root:root /var/lib/AccountsService/users/cianh && \
|
||||||
|
chmod 0600 /var/lib/AccountsService/users/cianh && \
|
||||||
|
chown root:root /var/lib/AccountsService/icons/cianh && \
|
||||||
|
chmod 0444 /var/lib/AccountsService/icons/cianh \
|
||||||
|
"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
pueued = {
|
||||||
|
enable = true;
|
||||||
|
description = "Pueue Daemon - CLI process scheduler and manager";
|
||||||
|
wantedBy = ["default.target"];
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "no";
|
||||||
|
ExecStart = "${pkgs.pueue.outPath}/bin/pueued -vv";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user