2024-08-02 17:43:00 +02:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
{
|
2024-08-12 17:36:14 +02:00
|
|
|
systemd.user.services.update-tldr-db = {
|
2024-08-02 17:43:00 +02:00
|
|
|
Unit = {
|
2024-08-12 17:36:14 +02:00
|
|
|
Description = "Update tealdeer database";
|
2024-08-02 17:43:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Service = {
|
|
|
|
Type = "oneshot";
|
|
|
|
CPUSchedulingPolicy = "idle";
|
|
|
|
IOSchedulingClass = "idle";
|
|
|
|
ExecStart = "${lib.getExe pkgs.tealdeer} --update";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-08-12 17:36:14 +02:00
|
|
|
systemd.user.timers.update-tldr-db = {
|
2024-08-02 17:43:00 +02:00
|
|
|
Unit = {
|
2024-08-12 17:36:14 +02:00
|
|
|
Description = "Update tealdeer database";
|
2024-08-02 17:43:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Timer = {
|
2024-08-12 17:36:14 +02:00
|
|
|
Unit = "update-tldr-db.service";
|
2024-08-02 17:43:00 +02:00
|
|
|
OnCalendar = "daily";
|
|
|
|
Persistent = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
Install = {
|
|
|
|
WantedBy = [ "timers.target" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|