try networkd again

This commit is contained in:
2026-01-17 10:08:11 -06:00
parent 7440ef91b4
commit 778433b318
2 changed files with 85 additions and 3 deletions

View File

@@ -26,8 +26,55 @@
];
nat.internalInterfaces = [ "ve-pihole" ];
/*firewall.interfaces."ve-traefik" = {
allowedTCPPorts = [ 53 80 ];
allowedUDPPorts = [ 53 ];
};*/
};
/*services = {
pihole-web = {
enable = true;
hostName = "pihole.local";
ports = [ 80 ];
};
pihole-ftl = {
enable = true;
openFirewallDNS = true;
openFirewallWebserver = true;
lists = [
{
url = "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts";
}
];
settings = {
dns = {
upstreams = [
#"127.0.0.1#5335"
"1.0.0.1"
"1.1.1.1"
];
cnameRecords = [
"traefik.local,local.internal.esotericbytes.com"
"pihole.local,local.internal.esotericbytes.com"
"hass.local,local.internal.esotericbytes.com"
];
};
misc.dnsmasq_lines = [ "interface=ve-traefik" ];
};
};
};*/
containers.pihole = {
autoStart = true;
@@ -130,8 +177,16 @@
systemd.services.pihole-ftl-setup.preStart = ''
while [[ ! ''$(ip l | grep eth0 | grep UP) ]]; do sleep 1; done;
'';
systemd.network = {
enable = true;
networks."eth0@if24" = {
linkConfig.requiredForOnline = "yes";
};
};
networking = {
useHostResolvConf = false;
firewall.allowedTCPPorts = [ 5335 ];
firewall.allowedUDPPorts = [ 5335 ];
};