nix_config/machines/cj/pihole.nix
2023-06-13 07:01:45 -04:00

31 lines
776 B
Nix

{ serverIP, serverIP6 } : {
image = "pihole/pihole:2023.05.2";
ports = [
"53:53/tcp"
"53:53/udp"
#"8088:80"
#"4438:443"
];
environment = {
TZ = "America/New_York";
ServerIP = serverIP;
FTLCONF_LOCAL_IPV4 = serverIP;
FTLCONF_LOCAL_IPV6 = serverIP6;
WEB_PORT = "8585";
WEBPASSWORD_FILE = "/run/secrets/pihole/webpassword";
TEMPERATUREUNIT = "f";
REPLY_ADDR4 = serverIP;
REPLY_ADDR6 = serverIP6;
};
volumes = [
"/serverdata/pihole/etc/pihole:/etc/pihole"
"/serverdata/pihole/etc/dnsmasq.d:/etc/dnsmasq.d"
"/run/secrets/pihole:/run/secrets/pihole"
];
extraOptions = [
#"--cap-add=NET_ADMIN"
"--network=host"
"--no-hosts" # do not populate internal /etc/hosts with container host's
];
}