Add pihole to NixOS, using NixOS container specifiers
This commit is contained in:
parent
2d76497a03
commit
a818c22412
|
@ -149,6 +149,27 @@
|
|||
|
||||
# Enable podman since we are on NixOS 21.05
|
||||
virtualisation.docker.enable = false;
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
virtualisation.oci-containers.containers = {
|
||||
pihole = {
|
||||
autoStart = true;
|
||||
environment = {
|
||||
TZ = "America/Phoenix";
|
||||
DNSMASQ_LISTENING = "all";
|
||||
};
|
||||
image = "docker.io/pihole/pihole:2024.07.0";
|
||||
ports = [
|
||||
"192.168.1.5:53:53/tcp"
|
||||
"192.168.1.5:53:53/udp"
|
||||
"192.168.1.5:67:67"
|
||||
"127.0.0.1:10000:80"
|
||||
];
|
||||
volumes = [
|
||||
"/etc/pihole/config:/etc/pihole"
|
||||
"/etc/pihole/dnsmasq.d:/etc/dnsmasq.d"
|
||||
];
|
||||
};
|
||||
};
|
||||
virtualisation.podman.enable = true;
|
||||
virtualisation.podman.dockerSocket.enable = true;
|
||||
virtualisation.podman.defaultNetwork.settings.dns_enabled = true;
|
||||
|
|
Loading…
Reference in New Issue