setup new host + migrate containers to it
This commit is contained in:
parent
804423319f
commit
0949fbc9c7
12 changed files with 8 additions and 15 deletions
24
nixos/viridian/containers/pihole/default.nix
Normal file
24
nixos/viridian/containers/pihole/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue