20 lines
483 B
Nix
20 lines
483 B
Nix
{ lib, ... }:
|
|
|
|
{
|
|
options.networking.ports = with lib; with lib.types; mkOption {
|
|
type = attrsOf (types.submodule {
|
|
options = {
|
|
tcp = mkOption {
|
|
type = oneOf [ port (listOf port) (attrsOf port) ];
|
|
description = "TCP ports";
|
|
default = [ ];
|
|
};
|
|
udp = mkOption {
|
|
type = oneOf [ port (listOf port) (attrsOf port) ];
|
|
description = "UDP ports";
|
|
default = [ ];
|
|
};
|
|
};
|
|
});
|
|
};
|
|
}
|