home/tealdeer: configure db fetch timer

This commit is contained in:
Oystein Kristoffer Tveit 2024-08-02 17:43:00 +02:00
parent 7f3dbd1d4c
commit 587791f5f8
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 34 additions and 4 deletions

View File

@ -19,6 +19,7 @@ in {
./programs/less.nix
./programs/neovim.nix
./programs/nix-index
./programs/tealdeer.nix
./programs/tmux.nix
./programs/zsh
@ -153,10 +154,6 @@ in {
enable = true;
# packageSet = pkgs.texlive.combined.scheme-medium;
};
tealdeer = {
enable = true;
settings.updates.auto_update = true;
};
zoxide.enable = true;
};

View File

@ -0,0 +1,33 @@
{ pkgs, lib, ... }:
{
programs.tealdeer.enable = true;
systemd.user.services.tealdeer-refresh = {
Unit = {
Description = "Refresh tealdeer contents";
};
Service = {
Type = "oneshot";
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
ExecStart = "${lib.getExe pkgs.tealdeer} --update";
};
};
systemd.user.timers.tealdeer-refresh = {
Unit = {
Description = "Refresh tealdeer contents";
};
Timer = {
Unit = "tealdeer-refresh.service";
OnCalendar = "daily";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
}