1

Add pihole service

This commit is contained in:
2023-09-04 13:49:59 +02:00
parent 1e00fd224c
commit c924c59cd3
2 changed files with 38 additions and 1 deletions

View File

@ -29,7 +29,7 @@
};
extraOptions = [
"--runtime=nvidia"
# "--runtime=nvidia" # Disable for now, testing if this conflicts with fileflows
];
};
}

View File

@ -0,0 +1,37 @@
{
config,
lib,
pkgs,
...
}: {
virtualisation.oci-containers.containers.pihole = {
image = "pihole/pihole:latest";
autoStart = true;
dependsOn = [];
ports = [
# Not required with --net=host
# "53:53/tcp"
# "53:53/udp"
# "67:67/udp" # Only for DHCP server
# "80:80/tcp"
];
volumes = [
"pihole_config:/etc/pihole"
"pihole_dnsmasq:/etc/dnsmasq.d"
];
environment = {
TZ = "Europe/Berlin";
# WEBPASSWORD = "";
FTLCONF_LOCAL_IPV4 = "192.168.86.105";
};
extraOptions = [
"--cap-add=NET_ADMIN" # Only for DHCP server
"--net=host" # For DHCP broadcast
];
};
}