diff --git a/configuration.nix b/configuration.nix index b955fa0..28fbb01 100644 --- a/configuration.nix +++ b/configuration.nix @@ -22,14 +22,7 @@ in { imports = [ "${fetchTarball "https://github.com/NixOS/nixos-hardware/archive/${nixosHardwareVersion}.tar.gz"}/raspberry-pi/4" ./network/static-ip.nix - ./services/openssh.nix - #./services/blocky.nix #dns - ./services/unbound.nix #dns - ./services/kea.nix #dhcp - ./services/nginx.nix #reverse proxy - ./services/qbittorrent.nix #torrent - ./services/kiwix.nix #wiki mirror - ./services/kiwix-updater.nix #wiki mirror update + ./services ./users ./programs ]; diff --git a/services/blocky.nix b/services/blocky.nix deleted file mode 100644 index 970fb4c..0000000 --- a/services/blocky.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ config, pkgs, ... }: - -let - net = import ../data/network.nix; -in -{ - # Enable Blocky - services.blocky = { - enable = true; - settings = { - # Listen on port 53 (standard DNS port) - ports.dns = 53; - - # Custom DNS entries for your local services - customDNS = { - # This maps your domains to your Pi's IP - mapping = net.dnsMappings; - # mapping = dnsMappings; - }; - - conditional = { - fallbackUpstream = false; - mapping = builtins.mapAttrs (name: value: net.ips.router) net.dnsMappings; - }; - - # Upstream DNS servers (with fallback) - upstreams = { - groups = { - default = - ["https://cloudflare-dns.com/dns-query"] ++ net.fallback_dns_servers; - }; - }; - - # Bootstrap DNS (for initially resolving DoH servers) - bootstrapDns = { - upstream = "https://1.1.1.1/dns-query"; - ips = ["1.1.1.1" "1.0.0.1"]; - }; - - # Enable caching for better performance - caching = { - minTime = "5m"; - maxTime = "30m"; - prefetching = true; - }; - - # blocking = { - # denylists = { - # ads = ["https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"]; - # }; - # clientGroupsBlock = { - # default = ["ads"]; - # }; - # }; - }; - }; - - # Allow DNS through the firewall - networking.firewall.allowedTCPPorts = [ 53 ]; - networking.firewall.allowedUDPPorts = [ 53 ]; -} diff --git a/services/default.nix b/services/default.nix new file mode 100644 index 0000000..fef269c --- /dev/null +++ b/services/default.nix @@ -0,0 +1,11 @@ +{...}: { + imports = [ + ./kea.nix + ./kiwix-updater.nix + ./kiwix.nix + ./nginx.nix + ./openssh.nix + ./qbittorent.nix + ./unbound.nix + ]; +}