-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Velocity Proxy server module #47
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good! I assume this has been tested in your setup and works well?
The main thing I would like before merging this would be to have it run through nixpkgs-fmt
, as that is the main formatter I use. (I really should add more documentation to the repo for stuff like that...)
I can run the formatter. Might take me a day or two before I can get back to this. I've also seen other flakes that include a style check in the actual flake checks so you can setup some GH actions to run |
Hi! I have some thoughts on this:
I hate to be this person but, I don't think we should add specialized modules. Minecraft network setups vary a lot (what if they want two proxies? etc). We should focus effort in improving the base module while always keeping module complexity in check. Most of this is already possible (the convenience is very, very small): services.minecraft-servers.servers.velocity = {
enable = true;
package = pkgs.velocity-server;
files."velocity.toml".value = {
bind = "0.0.0.0:25565";
forwarding-secret-file = ...;
servers = (mapAttrs (_: v: "localhost:${v.serverProperties.server-port}") config.minecraft-servers.servers) // {
try = [ "foo" ];
};
};
}; VS services.minecraft-servers.velocity = {
enable = true;
address = "0.0.0.0";
port = 25565;
forwarding-secret-file = ...;
config.try = [ "foo" ];
}; In my opinion, the first is actually easier to use and much more consistent. With it, there's no need to learn a separate NixOS option set for velocity, just combine what you already know about I don't think we should give special treatment to specific configuration files. Each server has different ones (sometimes multiple files), and we can't hope to keep up with their changes. Even If we're sure we want a specialized variant, it should be a very, very thin wrapper around |
Implement Velocity Proxy server module.
It's basically just a special-purpose version of the minecraft-servers module. We probably could just use the minecraft-servers module but some properties (specifically
serverProperties
andwhitelist
) don't really make any sense for Velocity.