Regenerated
This commit is contained in:
+306
-313
File diff suppressed because it is too large
Load Diff
+18
-25
@@ -2368,43 +2368,36 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Copy Wallpapers and Script
|
# Systemd timer + service for wallpapers
|
||||||
############################
|
############################
|
||||||
systemd.user.services.copyWallpapers = {
|
systemd.user.services.wallpaperUpdater = {
|
||||||
description = "Copy Wallpapers and script to home";
|
description = "Copy wallpapers and set them per workspace every 15 minutes";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
wants = [];
|
||||||
|
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
serviceConfig.ExecStart = ''
|
serviceConfig.ExecStart = ''
|
||||||
|
# Ensure destination exists
|
||||||
mkdir -p ${wallpaperDst}
|
mkdir -p ${wallpaperDst}
|
||||||
|
|
||||||
|
# Copy wallpapers from flake
|
||||||
cp -r ${flakeRoot}/assets/traveldroid/Wallpapers/* ${wallpaperDst}/
|
cp -r ${flakeRoot}/assets/traveldroid/Wallpapers/* ${wallpaperDst}/
|
||||||
chown -R ${username}:${username} ${wallpaperDst}
|
chown -R ${username}:${username} ${wallpaperDst}
|
||||||
chmod +x ${wallpaperDst}/set-wallpapers-per-workspace.sh
|
chmod +x ${wallpaperDst}/set-wallpapers-per-workspace.sh
|
||||||
|
|
||||||
|
# Run the wallpaper script
|
||||||
|
${wallpaperDst}/set-wallpapers-per-workspace.sh
|
||||||
'';
|
'';
|
||||||
enable = true;
|
# Optional: restart if it fails
|
||||||
|
serviceConfig.Restart = "on-failure";
|
||||||
};
|
};
|
||||||
|
|
||||||
############################
|
systemd.user.timers.wallpaperUpdaterTimer = {
|
||||||
# Periodic wallpaper updater
|
description = "Run wallpaperUpdater service every 15 minutes";
|
||||||
############################
|
timerConfig.OnUnitActiveSec = "15min";
|
||||||
systemd.user.services.wallpaperPerWorkspace = {
|
timerConfig.Persistent = true;
|
||||||
description = "Set wallpapers per workspace every 15 minutes";
|
|
||||||
after = [ "copyWallpapers.service" ];
|
|
||||||
wants = [ "copyWallpapers.service" ];
|
|
||||||
serviceConfig.Type = "simple";
|
|
||||||
serviceConfig.ExecStart = "${wallpaperDst}/set-wallpapers-per-workspace.sh";
|
|
||||||
install.WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.timers.wallpaperPerWorkspace = {
|
|
||||||
description = "Run wallpaper updater every 15 minutes";
|
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
timerConfig = {
|
unit = "wallpaperUpdater.service";
|
||||||
OnBootSec = "1min";
|
|
||||||
OnUnitActiveSec = "15min";
|
|
||||||
Persistent = true; # ensures catch-up if missed
|
|
||||||
};
|
|
||||||
unit = "wallpaperPerWorkspace.service";
|
|
||||||
enable = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|||||||
@@ -17,42 +17,35 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Copy Wallpapers and Script
|
# Systemd timer + service for wallpapers
|
||||||
############################
|
############################
|
||||||
systemd.user.services.copyWallpapers = {
|
systemd.user.services.wallpaperUpdater = {
|
||||||
description = "Copy Wallpapers and script to home";
|
description = "Copy wallpapers and set them per workspace every 15 minutes";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
wants = [];
|
||||||
|
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
serviceConfig.ExecStart = ''
|
serviceConfig.ExecStart = ''
|
||||||
|
# Ensure destination exists
|
||||||
mkdir -p ${wallpaperDst}
|
mkdir -p ${wallpaperDst}
|
||||||
|
|
||||||
|
# Copy wallpapers from flake
|
||||||
cp -r ${flakeRoot}/assets/traveldroid/Wallpapers/* ${wallpaperDst}/
|
cp -r ${flakeRoot}/assets/traveldroid/Wallpapers/* ${wallpaperDst}/
|
||||||
chown -R ${username}:${username} ${wallpaperDst}
|
chown -R ${username}:${username} ${wallpaperDst}
|
||||||
chmod +x ${wallpaperDst}/set-wallpapers-per-workspace.sh
|
chmod +x ${wallpaperDst}/set-wallpapers-per-workspace.sh
|
||||||
|
|
||||||
|
# Run the wallpaper script
|
||||||
|
${wallpaperDst}/set-wallpapers-per-workspace.sh
|
||||||
'';
|
'';
|
||||||
enable = true;
|
# Optional: restart if it fails
|
||||||
|
serviceConfig.Restart = "on-failure";
|
||||||
};
|
};
|
||||||
|
|
||||||
############################
|
systemd.user.timers.wallpaperUpdaterTimer = {
|
||||||
# Periodic wallpaper updater
|
description = "Run wallpaperUpdater service every 15 minutes";
|
||||||
############################
|
timerConfig.OnUnitActiveSec = "15min";
|
||||||
systemd.user.services.wallpaperPerWorkspace = {
|
timerConfig.Persistent = true;
|
||||||
description = "Set wallpapers per workspace every 15 minutes";
|
|
||||||
after = [ "copyWallpapers.service" ];
|
|
||||||
wants = [ "copyWallpapers.service" ];
|
|
||||||
serviceConfig.Type = "simple";
|
|
||||||
serviceConfig.ExecStart = "${wallpaperDst}/set-wallpapers-per-workspace.sh";
|
|
||||||
install.WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.timers.wallpaperPerWorkspace = {
|
|
||||||
description = "Run wallpaper updater every 15 minutes";
|
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
timerConfig = {
|
unit = "wallpaperUpdater.service";
|
||||||
OnBootSec = "1min";
|
|
||||||
OnUnitActiveSec = "15min";
|
|
||||||
Persistent = true; # ensures catch-up if missed
|
|
||||||
};
|
|
||||||
unit = "wallpaperPerWorkspace.service";
|
|
||||||
enable = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user