anchor.diff:        '';
       };
   
  -    hostPort = mkOption {
  -      type = types.listOf types.str;
  -      default = null;
  -      example = [ "8080" ];
  -      description = ''
  -        List of forwarded ports from the host to the container. 
  +    forwardPorts = mkOption {
  +      type = types.listOf (types.submodule {
  +        options = {
  +          protocol = mkOption {
  +            type = types.str;
  +            default = "tcp";
  +            description = "The protocol specifier for port forwarding between host and container";
  +          };
  +          hostPort = mkOption {
  +            type = types.int;
  +            description = "Source port of the external interface on host";
  +          };
  +          containerPort = mkOption {
  +            type = types.nullOr types.int;
  +            default = null;
  +            description = "Target port of container";
  +          };
  +        };
  +      });
  +      default = [];
  +      example = [ { protocol = "tcp"; hostPort = 8080; containerPort = 80; } ];
  +      description = ''
  +        List of forwarded ports from host to container. Each forwarded port is specified by protocol, hostPort and containerPort. By default, protocol is tcp and hostPort and containerPort are assumed to be the same if containerPort is not explicitly given. 
         '';
       };
   
  
positive.code:               ${optionalString (cfg.hostBridge != null) ''
                  HOST_BRIDGE=${cfg.hostBridge}
                ''}
                ${optionalString (length cfg.hostPort > 0) ''
                  HOST_PORT=${concatStringsSep "," cfg.hostPort}
                ''}
                ${optionalString (cfg.hostAddress != null) ''
                  HOST_ADDRESS=${cfg.hostAddress}
  
negative.code:           extraFlags+=" --network-bridge=$HOST_BRIDGE"
          fi
          if [ -n "$HOST_PORT" ]; then
            OIFS=$IFS
            IFS=","
            for i in $HOST_PORT
            do
                extraFlags+=" --port=$i"
            done
            IFS=$OIFS
          fi
        fi
  
  