Add the container config to the pihole module

This commit is contained in:
Andreas Zweili 2022-11-02 21:59:07 +01:00
parent 21c4cf2e1f
commit 58c9fcd3c0
1 changed files with 22 additions and 0 deletions

View File

@ -11,4 +11,26 @@
67 # DHCP
];
};
age.secrets.piholeEnv.file = "${inputs.self}/scrts/pihole_env.age";
virtualisation.oci-containers = {
containers."pihole" = {
image = "pihole/pihole";
autoStart = true;
environment = {
TZ = "Europe/Zurich";
ServerIP = "10.7.89.2";
DNS1 = "127.0.0.1#5335"; # we're using the local unboud server here
RATE_LIMIT = "10000/60";
};
environmentFiles = [ config.age.secrets.piholeEnv.path ];
volumes = [
"/home/andreas/docker_systems/pihole/etc-pihole:/etc/pihole/"
"/home/andreas/docker_systems/pihole/etc-dnsmasq.d:/etc/dnsmasq.d/"
];
extraOptions = [
"--network=host"
"--cap-add=NET_ADMIN"
];
};
};
}