diff --git a/modules/services/tldr-update.nix b/modules/services/tldr-update.nix index d5fb96a6..5322ac68 100644 --- a/modules/services/tldr-update.nix +++ b/modules/services/tldr-update.nix @@ -23,7 +23,9 @@ in description = '' Systemd timer period to create for scheduled {command}`tldr --update`. - The format is described in {manpage}`systemd.time(7)`. + On Linux this is a string as defined by {manpage}`systemd.time(7)`. + + ${lib.hm.darwin.intervalDocumentation} ''; }; }; @@ -53,5 +55,20 @@ in Install.WantedBy = [ "timers.target" ]; }; + + assertions = [ + (lib.hm.darwin.assertInterval "services.tldr-update.period" cfg.period pkgs) + ]; + + launchd.agents.tldr-update = { + enable = true; + config = { + ProgramArguments = [ + (lib.getExe cfg.package) + "--update" + ]; + StartCalendarInterval = lib.hm.darwin.mkCalendarInterval cfg.period; + }; + }; }; }