restructure dockers, add watchtower
This commit is contained in:
23
modules/homelab/docker/watchtower.nix
Normal file
23
modules/homelab/docker/watchtower.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ 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" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user