8000 `files."filename.toml".value` escaping MiniMessage color tags · Issue #158 · Infinidoge/nix-minecraft · GitHub
[go: up one dir, main page]

Skip to content

files."filename.toml".value escaping MiniMessage color tags #158

Open

Description

@ItsLiyua

I got a velocity server running but I can't change the color of the standard motd because the files set escapes the MiniMessage tags.

This is my config:

{ config, pkgs, ... }:
{
  sops.secrets.velocity.owner = "minecraft";
  services.minecraft-servers = {
    enable = true;
    eula = true;
    openFirewall = true;
    servers.proxy = {
      enable = true;
      package = pkgs.velocityServers.velocity;
      stopCommand = "stop";
      files = {
        "velocity.toml".value = {
          config-version = "2.5";
          bind = "0.0.0.0:25565";
          motd = "<red>This server is currently offline.</red>";
          online-mode = true;
          ping-passthrough = "ALL";
          servers = {
            smp = "10.15.0.2:25565";
            try = [ "smp" ];
          };
          forced-hosts.smp = [ "smp" ];
          player-info-forwarding-mode = "modern";
          forwarding-secret-file = config.sops.secrets.velocity.path;
        };
        "plugins/bStats/config.txt".value = [ "enabled=false" ];
      };
    };
  };
}

But the generated velocity.toml file contains the line motd = "\\<red>This server is currently offline.\\</red>" which escapes the color tags.

If I missed the option how to disable the auto escaping of the MiniMessage tags then please tell me.
Thanks for reading.

Activity

  1. changed the title [-]`files."fdilename.toml".value` escaping MiniMessage color tags[/-] [+]`files."filename.toml".value` escaping MiniMessage color tags[/+] on Jun 27, 2025
  2. Infinidoge commented on Jul 18, 2025

    @Infinidoge
    Owner

    Very strange. As best as I can tell, it should be calling pkgs.formats.toml's generate directly, and from my testing

    toml = pkgs.formats.toml {}
    :b toml.generate "text.toml" (paste your config here)
    

    it generates fine:
    Image

    When I get the chance, I'll test it in the module itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0