From 86014e836ca6f4a04d59b85111d39660bdda01cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= <11422515+DavSanchez@users.noreply.github.com> Date: Wed, 25 Mar 2026 14:39:48 +0000 Subject: [PATCH] tldr-update: darwin support --- modules/services/tldr-update.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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; + }; + }; }; }