anchor.diff:        preStart = ''
           mkdir -p ${cfg.dataDir} && chmod 0700 ${cfg.dataDir}
           if [ "$(id -u)" = 0 ]; then chown rabbitmq:rabbitmq ${cfg.dataDir}; fi
  +        
  +        ${optionalString (cfg.cookie != "") ''
  +            echo -n ${cfg.cookie} > ${cfg.dataDir}/.erlang.cookie
  +            chmod 400 ${cfg.dataDir}/.erlang.cookie
  +            chown rabbitmq:rabbitmq ${cfg.dataDir}/.erlang.cookie
  +        ''}
  +
  +        mkdir -p /var/log/rabbitmq && chmod 0700 /var/log/rabbitmq
  +        chown rabbitmq:rabbitmq /var/log/rabbitmq
         '';
       };
   
  
positive.code:         RABBITMQ_NODE_IP_ADDRESS = cfg.listenAddress;
          RABBITMQ_SERVER_START_ARGS = "-rabbit error_logger tty -rabbit sasl_error_logger false";
          SYS_PREFIX = "";
        };
  
        serviceConfig = {
          ExecStart = "${pkgs.rabbitmq_server}/sbin/rabbitmq-server";
  
negative.code:         '';
        };
  
        dataDir = mkOption {
          type = types.path;
          default = "/var/lib/rabbitmq";
  