25 lines
710 B
Nix
25 lines
710 B
Nix
{
|
|
services.terraria = {
|
|
enable = true;
|
|
port = 7777;
|
|
openFirewall = true;
|
|
worldPath = "/var/terraria/";
|
|
autoCreatedWorldSize = "large";
|
|
};
|
|
# Homepage
|
|
services.nginx.virtualHosts."terraria.hermitcollective.net" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:7777";
|
|
proxyWebsockets = true; # needed if you need to use WebSocket
|
|
extraConfig =
|
|
# required when the target is also TLS server with multiple hosts
|
|
"proxy_ssl_server_name on;" +
|
|
# required when the server wants to use HTTP Authentication
|
|
"proxy_pass_header Authorization;"
|
|
;
|
|
};
|
|
};
|
|
}
|
|
|