Regenerated
This commit is contained in:
+1
-12
@@ -23,32 +23,23 @@ in
|
||||
|
||||
systemd.services.copyWallpaperStuff = {
|
||||
description = "Copy wallpaper assets to user home";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
# 🔑 CRITICAL FIX
|
||||
after = [ "systemd-user-sessions.service" ];
|
||||
wants = [ "systemd-user-sessions.service" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
|
||||
script = ''
|
||||
# Wait until user exists (robust)
|
||||
for i in $(seq 1 10); do
|
||||
id ${username} && break
|
||||
sleep 1
|
||||
done
|
||||
|
||||
mkdir -p "${wallpaperDst}"
|
||||
|
||||
# Copy only if empty (prevents overwrite)
|
||||
if [ -z "$(ls -A ${wallpaperDst})" ]; then
|
||||
cp -r ${wallpaperSrc}/* "${wallpaperDst}/"
|
||||
fi
|
||||
|
||||
# 🔑 FIX: use user only, not group
|
||||
chown -R ${username} "${wallpaperDst}"
|
||||
chmod -R u+rwx "${wallpaperDst}"
|
||||
'';
|
||||
@@ -57,7 +48,6 @@ in
|
||||
#################################
|
||||
# Home Manager integration
|
||||
#################################
|
||||
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
|
||||
@@ -69,7 +59,6 @@ in
|
||||
#################################
|
||||
# swww daemon
|
||||
#################################
|
||||
|
||||
systemd.user.services.swww-daemon = {
|
||||
Unit = {
|
||||
Description = "swww wallpaper daemon";
|
||||
@@ -99,7 +88,7 @@ in
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''
|
||||
${pkgs.swww}/bin/swww img ${wallpaperDst}/* --transition-type any
|
||||
${pkgs.swww}/bin/swww img ${wallpaperDst} --transition-type fade slide blend zoom wipe cube fade-zoom slide-zoom
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user