Make services persistent

Most services have a startAt option e.g.
services.borgbackup.jobs.<name>.startAt and systemd.services.<name>startAt
which is very convenient such as is automatically creates a timer. However this timer does not seem to be persistent which triggers the service immediately if it missed the last start time.

Is there a way to make these services persistent without creating a extra systemd.timer?
If no, how do I create a systemd.timer with - in the name? The borg services are called borgbackup-job-name.

1 Like

Hi

I had the exact same problem.

Just adding this to your NixOS configuration will fix your problem (replace <name> the job name):

    systemd.timers."borgbackup-job-<name>".timerConfig.Persistent = true;
4 Likes