Fix pihole resolving hosts address using /etc/hosts
This commit is contained in:
parent
0a474a43cf
commit
a552dcd540
@ -122,31 +122,7 @@
|
|||||||
virtualisation.oci-containers.containers = let
|
virtualisation.oci-containers.containers = let
|
||||||
serverIP = "192.168.88.21";
|
serverIP = "192.168.88.21";
|
||||||
in {
|
in {
|
||||||
pihole = {
|
pihole = import ./pihole.nix serverIP;
|
||||||
image = "pihole/pihole:2022.07.1";
|
|
||||||
ports = [
|
|
||||||
"${serverIP}:53:53/tcp"
|
|
||||||
"${serverIP}:53:53/udp"
|
|
||||||
"8088:80"
|
|
||||||
"4438:443"
|
|
||||||
];
|
|
||||||
environment = {
|
|
||||||
TZ = "America/New_York";
|
|
||||||
ServerIP = serverIP;
|
|
||||||
WEBPASSWORD_FILE = "/run/secrets/pihole/webpassword";
|
|
||||||
};
|
|
||||||
#extraDockerOptions = [
|
|
||||||
##"--cap-add=NET_ADMIN"
|
|
||||||
#"--dns=127.0.0.1"
|
|
||||||
#"--dns=1.1.1.1"
|
|
||||||
#];
|
|
||||||
volumes = [
|
|
||||||
"/serverdata/pihole/etc/pihole:/etc/pihole"
|
|
||||||
"/serverdata/pihole/etc/dnsmasq.d:/etc/dnsmasq.d"
|
|
||||||
"/run/secrets/pihole:/run/secrets/pihole"
|
|
||||||
];
|
|
||||||
#workdir = "/serverdata/pihole/etc/pihole";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# List services that you want to enable:
|
# List services that you want to enable:
|
||||||
|
|||||||
26
machines/pedro/pihole.nix
Normal file
26
machines/pedro/pihole.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
serverIP :
|
||||||
|
{
|
||||||
|
image = "pihole/pihole:2022.07.1";
|
||||||
|
ports = [
|
||||||
|
"${serverIP}:53:53/tcp"
|
||||||
|
"${serverIP}:53:53/udp"
|
||||||
|
"8088:80"
|
||||||
|
"4438:443"
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
TZ = "America/New_York";
|
||||||
|
ServerIP = serverIP;
|
||||||
|
FTLCONF_LOCAL_IPV4 = serverIP;
|
||||||
|
WEBPASSWORD_FILE = "/run/secrets/pihole/webpassword";
|
||||||
|
TEMPERATUREUNIT = "f";
|
||||||
|
REPLY_ADDR4 = serverIP;
|
||||||
|
};
|
||||||
|
volumes = [
|
||||||
|
"/serverdata/pihole/etc/pihole:/etc/pihole"
|
||||||
|
"/serverdata/pihole/etc/dnsmasq.d:/etc/dnsmasq.d"
|
||||||
|
"/run/secrets/pihole:/run/secrets/pihole"
|
||||||
|
];
|
||||||
|
extraOptions = [
|
||||||
|
"--no-hosts" # do not populate internal /etc/hosts with container host's
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user