feat(ebook-search): set up uv cache management and pruning service
treefmt / nix fmt (pull_request) Successful in 5s
pytest / pytest (pull_request) Successful in 27s
test ebook search / test-ebook-search (pull_request) Successful in 34s
build_systems / build-brain (pull_request) Successful in 48s
build_systems / build-bob (pull_request) Successful in 50s
build_systems / build-rhapsody-in-green (pull_request) Successful in 1m3s
build_systems / build-jeeves (pull_request) Successful in 2m14s
treefmt / nix fmt (push) Successful in 4s
test ebook search / test-ebook-search (push) Successful in 27s
pytest / pytest (push) Successful in 30s
build_systems / build-brain (push) Successful in 34s
build_systems / build-bob (push) Successful in 37s
build_systems / build-jeeves (push) Successful in 2m9s
build_systems / build-rhapsody-in-green (push) Successful in 48s

This commit was merged in pull request #40.
This commit is contained in:
2026-07-12 17:26:55 -04:00
parent 91575e3ab2
commit 8c3de690c9
8 changed files with 65 additions and 14 deletions
+28
View File
@@ -0,0 +1,28 @@
{ pkgs, ... }:
let
vars = import ../vars.nix;
runnerUsername = "gitea-runner";
in
{
systemd = {
services.uv-cache-prune = {
description = "Prune the shared gitea runner uv cache";
environment.UV_CACHE_DIR = vars.uv_cache;
serviceConfig = {
Type = "oneshot";
User = runnerUsername;
Group = runnerUsername;
ExecStart = "${pkgs.uv}/bin/uv cache prune";
};
};
timers.uv-cache-prune = {
description = "Monthly prune of the shared gitea runner uv cache";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "*-*-01 04:00:00";
Persistent = true;
};
};
};
}