Fix duplicate port check

This commit is contained in:
Jakob Lechner 2025-04-10 01:13:11 +02:00
parent 48e71f75f8
commit 6f01431032
39 changed files with 132 additions and 158 deletions

View file

@ -1,16 +1,16 @@
{lib, ...}:
{ lib, ... }:
{
options.networking.ports = with lib; with lib.types; mkOption {
type = attrsOf (types.submodule {
options = {
tcp = mkOption {
type = oneOf [ port (listOf port) (attrsOf port) (listOf (attrsOf lib.types.port)) ];
type = oneOf [ port (listOf port) (attrsOf port) ];
description = "TCP ports";
default = [ ];
};
udp = mkOption {
type = oneOf [ port (listOf port) (attrsOf port) (listOf (attrsOf lib.types.port)) ];
type = oneOf [ port (listOf port) (attrsOf port) ];
description = "UDP ports";
default = [ ];
};