dotfiles.nix/nixos/lavender/containers/pihole/default.nix

25 lines
521 B
Nix
Raw Normal View History

2023-05-16 15:52:55 +08:00
{ ... }:
{
# 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"
2023-05-21 17:41:24 +08:00
"/srv/containers/pihole/secrets:/secrets"
2023-05-16 15:52:55 +08:00
];
ports = [
"53:53/tcp"
"53:53/udp"
2023-05-21 17:41:24 +08:00
"8181:80/tcp"
2023-05-16 15:52:55 +08:00
];
environment = {
2023-05-21 17:41:24 +08:00
WEBPASSWORD_FILE = "/secrets/admin-password";
2023-05-16 15:52:55 +08:00
DNSMASQ_LISTENING = "all";
};
};
}