nixos/syncoid: catch up missed timer runs (Persistent=true) (#558600)

This commit is contained in:
Sandro
2026-09-08 20:21:17 +00:00
committed by GitHub

View File

@@ -362,7 +362,6 @@ in
{
description = "Syncoid ZFS synchronization from ${c.source} to ${c.target}";
after = [ "zfs.target" ];
startAt = cfg.interval;
# syncoid may need zpool to get feature@extensible_dataset
path = [ "/run/booted-system/sw/bin/" ];
serviceConfig = {
@@ -473,6 +472,23 @@ in
]
)
) cfg.commands;
systemd.timers = lib.concatMapAttrs (
name: c:
lib.optionalAttrs
(config.systemd.services."syncoid-${escapeUnitName name}".enable && cfg.interval != [ ])
{
"syncoid-${escapeUnitName name}" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = cfg.interval;
# Backup timers should catch up on missed windows (e.g. the
# machine was powered off), like restic and btrbk do.
Persistent = true;
};
};
}
) cfg.commands;
};
meta.maintainers = with lib.maintainers; [