initial restructuring

This commit is contained in:
2026-08-08 21:12:37 -06:00
parent d1e4ae22d2
commit bb038bfba0
62 changed files with 0 additions and 3 deletions
+18
View File
@@ -0,0 +1,18 @@
{ config, pkgs, ... }:
{
imports = [
./pi-hole.nix
];
networking = {
networkmanager.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [];
allowedUDPPorts = [];
};
};
}
+48
View File
@@ -0,0 +1,48 @@
{ config, pkgs, ... }:
{
networking.networkmanager.insertNameservers = [ "127.0.0.1" ];
systemd.tmpfiles.rules = [
"d /var/lib/pihole 0777 root root -"
"d /var/lib/pihole/etc 0777 root root -"
"d /var/lib/pihole/dnsmasq 0777 root root -"
];
# Explicitly set the OCI container backend to Podman
virtualisation.oci-containers.backend = "podman";
# Define the Pi-Hole container
virtualisation.oci-containers.containers.pihole = {
image = "docker.io/pihole/pihole:latest";
ports = [
"53:53/tcp" # DNS
"53:53/udp" # DNS
"8775:80/tcp" # Web UI
];
volumes = [
"/var/lib/pihole/etc:/etc/pihole"
"/var/lib/pihole/dnsmasq:/etc/dnsmasq.d"
];
environment = {
TZ = "America/Denver";
};
autoStart = true;
# Extra Podman arguments for additional capabilities Pi-Hole requires
extraOptions = [
"--cap-add=NET_ADMIN"
];
};
# Open the required ports in the NixOS firewall
networking.firewall = {
allowedTCPPorts = [ 53 80 ];
allowedUDPPorts = [ 53 ];
};
}