feat(nixos): add UDP route ingress

This commit was merged in pull request #36.
This commit is contained in:
2026-09-10 09:08:47 -04:00
parent 88762118b9
commit 5758a781d8
3 changed files with 57 additions and 3 deletions

View File

@@ -5,6 +5,13 @@
assertion = lib.registry.predicates.uniqueValue (entry: entry.value.domain);
message = "Route domains must be unique.";
}
{
assertion = entries:
lib.registry.predicates.uniqueValue (entry: entry.value) (
lib.concatMap (entry: map (port: entry // { value = port; }) entry.value.udp.ports) entries
);
message = "Route UDP ports must be unique.";
}
];
type = lib.types.submodule {
@@ -12,14 +19,25 @@
domain = lib.mkOption {
type = lib.types.str;
example = "files.alexion.dev";
description = "Public domain served by this reverse-proxy route entry.";
description = "Public domain served by this route entry.";
};
port = lib.mkOption {
type = lib.types.ints.between 1 65535;
type = lib.types.nullOr lib.types.port;
default = null;
example = 3923;
description = "Backend TCP port served by the matching address registry entry.";
};
udp.ports = lib.mkOption {
type = lib.types.listOf lib.types.port;
default = [ ];
example = [
2456
2457
];
description = "UDP ports served by the matching address registry entry.";
};
};
};
}