dotfiles.nix/nixos/viridian/containers/pihole/default.nix
2023-10-30 21:38:56 +00:00

25 lines
625 B
Nix

{ ... }:
{
# Pi-hole
virtualisation.oci-containers.containers."pihole" = {
autoStart = true;
image = "pihole/pihole:latest";
volumes = [
"/srv/containers/pihole/etc-pihole:/etc/pihole"
"/srv/containers/pihole/etc-dnsmasq.d:/etc/dnsmasq.d"
"/srv/containers/pihole/secrets:/secrets"
];
ports = [
"192.168.1.102:53:53/tcp" # pihole-FTL (DNS)
"192.168.1.102:53:53/udp" # pihole-FTL (DNS)
"192.168.1.102:8181:80/tcp" # lighttpd (HTTP)
];
environment = {
WEBPASSWORD_FILE = "/secrets/admin-password";
DNSMASQ_LISTENING = "all";
};
};
}