diff --git a/configuration.nix b/configuration.nix index 1779320..829df72 100644 --- a/configuration.nix +++ b/configuration.nix @@ -131,22 +131,18 @@ }; systemd = { - timers."start-runner" = { - wantedBy = [ "timers.target" ]; - timerConfig = { - OnBootSec = "2m"; - OnCalendar = "daily"; - Persistent = true; - Unit = "start-runner.service"; + services = { + "gitea-actions-runner" = { + serviceConfig = { + ExecStart = "/root/runner/act_runner daemon"; + ExecReload = "/bin/kill -s HUP $MAINPID"; + WorkingDirectory = "/root/runner"; + TimeoutSec = 0; + RestartSec = 10; + Restart = "always"; + # User = "root"; }; - }; - services."start-runner" = { - script = '' - /root/runner/act_runner daemon & - ''; - serviceConfig = { - Type = "oneshot"; - User = "root"; + wantedBy = [ "multi-user.target" ]; }; }; };