flux icon indicating copy to clipboard operation
flux copied to clipboard

is it possible to define the mcman `server.toml` file declaratively in `mkMinecraftServer`?

Open cmhulbert opened this issue 10 months ago • 1 comments

Is your feature request related to a problem? Please describe. I'm trying to definte the server.toml that is used during the mcman build step, in nix, so it is written prior to calling mcman build but so far have not been able to figure out how to do it.

Describe the solution you'd like Ideally a nix structure that can be saved to a toml would be great

Describe alternatives you've considered I have tried overrideAttrs on the result of mkMinecraftServer but have had no luck with this. If there is a way to do it like this, I have not been able to figure it out.

Additional context I'm trying to specify the port especially based on some other nix expressions I share with other portions that touch the firewall. It'd be nice to have this defined once, and then used here, rather than having to manually update the server.toml.

cmhulbert avatar Feb 18 '25 05:02 cmhulbert

If you want to go down that route, you'd have to do some changes to mkMinecraftServer.

Namely, you'd have to separate src into an attrset that represents config.toml (iirc the attrset can be parsed into a toml file) and the config folder.

hustlerone avatar Mar 20 '25 10:03 hustlerone