This repository has been archived on 2024-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
nixos/hosts/bebop/pihole.nix
2023-12-22 23:05:08 +05:30

30 lines
682 B
Nix

{ ... }:
let
serverIP = "0.0.0.0";
in
{
virtualisation.oci-containers.containers.pihole = {
autoStart = true;
image = "pihole/pihole@sha256:be2fd6bd768e37743cd44cc7787fbdd83faca8a0e16820a7885715a7ffba4208";
login.registry = "https://docker.pkg.github.com";
ports = [
"${serverIP}:53:53/tcp"
"${serverIP}:53:53/udp"
"3080:80"
"30443:443"
];
volumes = [
"/var/lib/pihole/:/etc/pihole/"
"/var/lib/dnsmasq.d:/etc/dnsmasq.d/"
];
environment = {
ServerIP = serverIP;
TZ = "Asia/Kolkata";
};
extraOptions = [
"--cap-add=NET_ADMIN"
"--dns=127.0.0.1"
"--dns=1.1.1.1"
];
};
}