initial commit

This commit is contained in:
2026-05-14 13:39:10 +02:00
commit 7e444146d2
37 changed files with 1537 additions and 0 deletions

30
configuration/pihole.nix Normal file
View File

@@ -0,0 +1,30 @@
{ config, ... }:
let port = "9123";
host = "pihole.${config.domainName}";
in {
services.pihole-ftl = {
enable = false;
openFirewallDNS = true;
lists = [ {
url = "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/pro.txt";
type = "block";
enabled = true;
description = "hagezi blocklist";
} ];
settings.dns.upstreams = [ "9.9.9.9" "1.1.1.1" ];
};
services.pihole-web = {
enable = config.services.pihole-ftl.enable;
ports = [ "${port}s" ];
hostName = host;
};
security.acme.certs."${config.domainName}".extraDomainNames = [ host ];
services.nginx.virtualHosts.${host} = {
# TODO get secrets from sops
basicAuth.admin = "";
useACMEHost = config.domainName;
addSSL = true;
locations."/".proxyPass = "https://localhost:${port}";
};
}