home/tealdeer: add timer for updating tldr db

This commit is contained in:
Oystein Kristoffer Tveit 2024-08-12 17:36:14 +02:00
parent 4b4cae7cd1
commit a8aec2c3b8
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
3 changed files with 14 additions and 8 deletions

View File

@ -19,7 +19,7 @@ in {
./programs/less.nix ./programs/less.nix
./programs/neovim.nix ./programs/neovim.nix
./programs/nix-index ./programs/nix-index
./programs/tealdeer.nix ./programs/tealdeer
./programs/tmux.nix ./programs/tmux.nix
./programs/zsh ./programs/zsh

View File

@ -1,10 +1,8 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ {
programs.tealdeer.enable = true; systemd.user.services.update-tldr-db = {
systemd.user.services.tealdeer-refresh = {
Unit = { Unit = {
Description = "Refresh tealdeer contents"; Description = "Update tealdeer database";
}; };
Service = { Service = {
@ -15,13 +13,13 @@
}; };
}; };
systemd.user.timers.tealdeer-refresh = { systemd.user.timers.update-tldr-db = {
Unit = { Unit = {
Description = "Refresh tealdeer contents"; Description = "Update tealdeer database";
}; };
Timer = { Timer = {
Unit = "tealdeer-refresh.service"; Unit = "update-tldr-db.service";
OnCalendar = "daily"; OnCalendar = "daily";
Persistent = true; Persistent = true;
}; };

View File

@ -0,0 +1,8 @@
{ pkgs, lib, ... }:
{
imports = [
./auto-update-tldr-db.nix
];
programs.tealdeer.enable = true;
}