refactor(nixos): order route type definitions
This commit is contained in:
@@ -1,19 +1,6 @@
|
|||||||
{ lib, util, ... }:
|
{ lib, util, ... }:
|
||||||
|
# NOLINT(let_order)
|
||||||
let
|
let
|
||||||
webRoute =
|
|
||||||
routeType
|
|
||||||
[
|
|
||||||
"http"
|
|
||||||
"https"
|
|
||||||
]
|
|
||||||
{
|
|
||||||
port = lib.mkOption {
|
|
||||||
type = lib.types.port;
|
|
||||||
example = 3923;
|
|
||||||
description = "HTTP backend port for this route.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
routeType =
|
routeType =
|
||||||
protocols: options:
|
protocols: options:
|
||||||
lib.types.submodule {
|
lib.types.submodule {
|
||||||
@@ -32,6 +19,20 @@ let
|
|||||||
// options;
|
// options;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
webRoute =
|
||||||
|
routeType
|
||||||
|
[
|
||||||
|
"http"
|
||||||
|
"https"
|
||||||
|
]
|
||||||
|
{
|
||||||
|
port = lib.mkOption {
|
||||||
|
type = lib.types.port;
|
||||||
|
example = 3923;
|
||||||
|
description = "HTTP backend port for this route.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
udpRoute = routeType [ "udp" ] {
|
udpRoute = routeType [ "udp" ] {
|
||||||
ports = lib.mkOption {
|
ports = lib.mkOption {
|
||||||
type = lib.types.nonEmptyListOf lib.types.port;
|
type = lib.types.nonEmptyListOf lib.types.port;
|
||||||
|
|||||||
Reference in New Issue
Block a user