make systemd services more robust

This commit is contained in:
Sean Kovacs 2026-02-21 09:48:03 -05:00
commit 1ecf9fa51a
Signed by: sckova
GPG key ID: 00F325187C68651A
2 changed files with 7 additions and 55 deletions

View file

@ -6,8 +6,6 @@
systemd.user.services.awww-daemon = {
Unit.Description = "Wallpaper service using awww (daemon)";
Service.ExecStart = "${pkgs.awww}/bin/awww-daemon";
Unit.After = [ "graphical-session.target" ];
Unit.PartOf = [ "graphical-session.target" ];
Install.WantedBy = [ "graphical-session.target" ];
};
@ -26,10 +24,10 @@
systemd.user.services.bing-wallpaper = {
Unit.Description = "Download and set Bing wallpaper of the day";
Unit.StartLimitBurst = 5;
Unit.StartLimitBurst = 6;
Unit.StartLimitIntervalSec = "10m";
Service.Restart = "on-failure";
Service.RestartSec = "1m";
Service.RestartSec = "10s";
Service.Type = "oneshot";
Service.ExecStart = pkgs.lib.getExe (
pkgs.writeShellApplication {
@ -68,6 +66,7 @@
}
);
Service.ExecStartPost = "${pkgs.systemd}/bin/systemctl --user restart awww-setter.service";
Install.WantedBy = [ "graphical-session.target" ];
};
systemd.user.timers.bing-wallpaper = {