feat(tsuba): Add image pruning systemd timer
Some checks failed
Flake checker / Build Nix targets (push) Has been cancelled

This commit is contained in:
2026-01-13 00:55:46 +05:30
parent 49ad26ac1c
commit 165dff7faa
4 changed files with 23 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
{pkgs, ...}: {
virtualisation.docker.enable = true;
virtualisation.oci-containers.backend = "docker";
systemd.services.docker-prune-image = {
description = "Docker prune unused images";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.docker}/bin/docker image prune -f";
};
};
systemd.timers.docker-prune-image = {
description = "Timer for docker image prune";
wantedBy = ["timers.target"];
timerConfig = {
OnCalendar = "Mon *-*-* 02:00:00";
OnUnitInactiveSec = "6d";
Persistent = true;
RandomizedDelaySec = "1h";
};
};
}