42 lines
1.0 KiB
Nix
Raw Normal View History

2024-07-05 14:30:41 -04:00
{ config, ... }:
2024-05-27 20:20:00 -04:00
{
virtualisation.oci-containers.containers = {
haproxy = {
image = "haproxy:latest";
2024-07-05 14:50:39 -04:00
user = "600:600";
2024-05-27 20:20:00 -04:00
environment = {
TZ = "Etc/EST";
};
volumes = [
2024-07-05 14:30:41 -04:00
"${config.sops.secrets."docker/haproxy_cert".path}:/etc/ssl/certs/cloudflare.pem"
"${./haproxy.cfg}:/usr/local/etc/haproxy/haproxy.cfg"
2024-05-27 20:20:00 -04:00
];
2024-07-05 14:57:29 -04:00
dependsOn = [
"arch_mirror"
"uptime_kuma"
];
2024-05-27 20:20:00 -04:00
extraOptions = [ "--network=web" ];
autoStart = true;
};
cloud_flare_tunnel = {
image = "cloudflare/cloudflared:latest";
cmd = [
"tunnel"
"run"
];
2024-07-05 14:30:41 -04:00
environmentFiles = [ config.sops.secrets."docker/cloud_flare_tunnel".path ];
2024-05-27 20:20:00 -04:00
dependsOn = [ "haproxy" ];
extraOptions = [ "--network=web" ];
autoStart = true;
};
};
2024-07-05 14:30:41 -04:00
sops = {
defaultSopsFile = ../secrets.yaml;
secrets = {
"docker/cloud_flare_tunnel".owner = "docker-service";
"docker/haproxy_cert".owner = "docker-service";
};
};
2024-05-27 20:20:00 -04:00
}