1
0

hosts/porter: Resolve nginx proxy upstreams via unbound

This commit is contained in:
2025-06-24 16:42:03 +02:00
parent e24190ae08
commit 86bfe85982
3 changed files with 17 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ let
mkServerBlock = isUDP: port: forward: ''
server {
resolver 127.0.0.53 ipv4=off valid=30s;
resolver ${cfg.resolver} ipv4=off valid=30s;
listen ${port}${optionalString isUDP " udp"}${optionalString (forward.certName != null) " ssl"};
listen [::]:${port}${optionalString isUDP " udp"}${optionalString (forward.certName != null) " ssl"};
@@ -54,6 +54,10 @@ in
options = {
clerie.nginx-port-forward = {
enable = mkEnableOption "Nginx Port Forward";
resolver = mkOption {
type = types.str;
description = "IP address of the resolver to use for upstream hostnames";
};
tcpPorts = mkOption {
type = with types; attrsOf (submodule portOpts);
default = {};