users/systemd: disable autostart limit for user services

This commit is contained in:
2025-02-25 03:54:58 +00:00
parent 9e6eb1eb94
commit 4fd4f6fa2f

View File

@@ -73,11 +73,13 @@ let
(lib.mkIf (command != null && readiness.waitCommand == null) { (lib.mkIf (command != null && readiness.waitCommand == null) {
serviceConfig.Type = "simple"; serviceConfig.Type = "simple";
serviceConfig.Restart = restartCondition; serviceConfig.Restart = restartCondition;
startLimitIntervalSec = 0; #< disable restart limit
serviceConfig.ExecStart = command; serviceConfig.ExecStart = command;
}) })
(lib.mkIf (command != null && readiness.waitCommand != null) { (lib.mkIf (command != null && readiness.waitCommand != null) {
serviceConfig.Type = "notify"; serviceConfig.Type = "notify";
serviceConfig.Restart = restartCondition; serviceConfig.Restart = restartCondition;
startLimitIntervalSec = 0; #< disable restart limit
# serviceConfig.NotifyAccess = "exec"; #< allow anything in Exec* to invoke systemd-notify # serviceConfig.NotifyAccess = "exec"; #< allow anything in Exec* to invoke systemd-notify
serviceConfig.NotifyAccess = "all"; #< allow anything in Exec* to invoke systemd-notify serviceConfig.NotifyAccess = "all"; #< allow anything in Exec* to invoke systemd-notify
script = '' script = ''