refactor(nixos): order route type definitions

This commit is contained in:
2026-10-04 23:52:19 -04:00
parent b55508276a
commit 9eb007df66

View File

@@ -1,19 +1,6 @@
{ lib, util, ... }:
# NOLINT(let_order)
let
webRoute =
routeType
[
"http"
"https"
]
{
port = lib.mkOption {
type = lib.types.port;
example = 3923;
description = "HTTP backend port for this route.";
};
};
routeType =
protocols: options:
lib.types.submodule {
@@ -32,6 +19,20 @@ let
// options;
};
webRoute =
routeType
[
"http"
"https"
]
{
port = lib.mkOption {
type = lib.types.port;
example = 3923;
description = "HTTP backend port for this route.";
};
};
udpRoute = routeType [ "udp" ] {
ports = lib.mkOption {
type = lib.types.nonEmptyListOf lib.types.port;