37 lines
681 B
Nix
37 lines
681 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
# Enable Docker
|
|
virtualisation.docker = {
|
|
enable = true;
|
|
storageDriver = "overlay2";
|
|
};
|
|
|
|
# Container setup
|
|
docker-containers = {
|
|
pihole = {
|
|
image = "pihole/pihole:latest";
|
|
ports = [
|
|
"53:53/tcp"
|
|
"53:53/udp"
|
|
"3080:80"
|
|
"30443:443"
|
|
];
|
|
volumes = [
|
|
"/var/lib/pihole/:/etc/pihole/"
|
|
"/var/lib/dnsmasq/.d:/etc/dnsmasq.d/"
|
|
];
|
|
environment = {
|
|
ServerIP = "192.168.1.2";
|
|
};
|
|
extraDockerOptions = [
|
|
"--cap-add=NET_ADMIN"
|
|
"--dns=127.0.0.1"
|
|
"--dns=1.1.1.1"
|
|
];
|
|
workdir = "/var/lib/pihole/";
|
|
};
|
|
};
|
|
|
|
}
|