nixos-config/services/watchtower.nix

21 lines
535 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
# watchtower keeps images & containers up-to-date
{
virtualisation.oci-containers.containers = {
watchtower = {
image = "containrrr/watchtower";
volumes = [
"/var/run/podman/podman.sock:/var/run/docker.sock"
"/etc/localtime:/etc/localtime:ro"
];
environment = {
2022-10-16 12:29:09 +02:00
# some containers take really long to shut down
WATCHTOWER_TIMEOUT = "120s";
WATCHTOWER_CLEANUP = "true";
WATCHTOWER_INCLUDE_STOPPED = "true";
};
};
};
}