refactor(nixos): order route type definitions
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user