Files
nix/modules/homelab/docker/watchtower.nix

24 lines
693 B
Nix

{ pkgs, config, lib, ... }:
{
options = {
modules.homelab.docker.watchtower.enable = lib.mkEnableOption "enable watchtower docker";
};
config = lib.mkIf config.modules.homelab.docker.watchtower.enable {
virtualisation.docker.containers.watchtower = {
image = "containrrr/watchtower";
containerName = "watchtower";
restartPolicy = "unless-stopped";
environment = {
TZ = "America/Chicago";
WATCHTOWER_INCLUDE_RESTARTING = "America/Chicago";
WATCHTOWER_CLEANUP = "true";
WATCHTOWER_POLL_INTERVAL = "43200";
};
volumes = [ "/var/run/docker.sock:/var/run/docker.sock" ];
};
};
}