setup new host + migrate containers to it

This commit is contained in:
♥ Minnie ♥ 2023-10-30 16:39:05 +08:00
parent 804423319f
commit 0949fbc9c7
12 changed files with 8 additions and 15 deletions

View file

@ -0,0 +1,24 @@
{ ... }:
{
# Pi-hole
virtualisation.oci-containers.containers."pihole" = {
autoStart = true;
image = "pihole/pihole:latest";
volumes = [
"/srv/containers/pihole/etc-pihole:/etc/pihole"
"/srv/containers/pihole/etc-dnsmasq.d:/etc/dnsmasq.d"
"/srv/containers/pihole/secrets:/secrets"
];
ports = [
"192.168.1.100:53:53/tcp" # pihole-FTL (DNS)
"192.168.1.100:53:53/udp" # pihole-FTL (DNS)
"192.168.1.100:8181:80/tcp" # lighttpd (HTTP)
];
environment = {
WEBPASSWORD_FILE = "/secrets/admin-password";
DNSMASQ_LISTENING = "all";
};
};
}