anchor.diff:            <literal>guest</literal> by default, so you should delete
             this user if you intend to allow external access.
           '';
  +        type = types.str;
  +      };
  +
  +      port = mkOption {
  +        default = 5672;
  +        description = ''
  +          Port on which RabbitMQ will listen for AMQP connections.
  +        '';
  +        type = types.int;
         };
   
         dataDir = mkOption {
  
positive.code:       description = "RabbitMQ Server";
  
        wantedBy = [ "multi-user.target" ];
        after = [ "network-interfaces.target" ];
  
        path = [ pkgs.rabbitmq_server ];
  
        environment = {
          RABBITMQ_MNESIA_BASE = "${cfg.dataDir}/mnesia";
          RABBITMQ_NODE_IP_ADDRESS = cfg.listenAddress;
          RABBITMQ_SERVER_START_ARGS = "-rabbit error_logger tty -rabbit sasl_error_logger false";
          SYS_PREFIX = "";
          RABBITMQ_ENABLED_PLUGINS_FILE = pkgs.writeText "enabled_plugins" ''
            [ ${concatStringsSep "," cfg.plugins} ].
  
negative.code: 
        serviceConfig = {
          ExecStart = "${pkgs.rabbitmq_server}/sbin/rabbitmq-server";
          ExecStop = "${pkgs.rabbitmq_server}/sbin/rabbitmqctl stop";
          User = "rabbitmq";
          Group = "rabbitmq";
          WorkingDirectory = cfg.dataDir;
        };
  
        postStart = ''
          rabbitmqctl wait ${cfg.dataDir}/pid
        '';
  
        preStart = ''
          ${optionalString (cfg.cookie != "") ''
              echo -n ${cfg.cookie} > ${cfg.dataDir}/.erlang.cookie
              chmod 400 ${cfg.dataDir}/.erlang.cookie
          ''}
        '';
      };
  
    };
  