Adding a minecraft server
This commit is contained in:
parent
fba02c0c19
commit
a1e1272ebb
3 changed files with 79 additions and 0 deletions
|
|
@ -26,6 +26,7 @@
|
|||
../../modules/server/link
|
||||
../../modules/server/maistro
|
||||
../../modules/server/mikau
|
||||
../../modules/server/midona
|
||||
../../modules/server/nayru
|
||||
../../modules/server/taf
|
||||
../../modules/server/tetra
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
- `link` : Kanidm (`auth.lyes.eu`)
|
||||
- `maistro` : Incus
|
||||
- `mikau` : Jellyfin (`media.lyes.eu`)
|
||||
- `midona` : Gate Minecraft Server Proxy
|
||||
- `mogma` : VPN NetNS Configuration
|
||||
- `nayru` : Komga/Manga (`manga.lyes.eu`)
|
||||
- `taf` : Mail (`taf.lyes.eu`/`mail.lyes.eu`)
|
||||
|
|
|
|||
77
modules/server/midona/default.nix
Normal file
77
modules/server/midona/default.nix
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
config = lib.toFile "config.yml" ''
|
||||
config:
|
||||
lite:
|
||||
enabled: true
|
||||
routes:
|
||||
- host: stepson.minecraft.minish.link
|
||||
backend: 10.0.100.80:25565
|
||||
'';
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ gate ];
|
||||
|
||||
systemd.services.gate = {
|
||||
description = "Gate Minecraft Proxy";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.gate}/bin/gate --config ${config}";
|
||||
Restart = "always";
|
||||
|
||||
# StandardInput = "socket";
|
||||
# StandardOutput = "journal";
|
||||
# StandardError = "journal";
|
||||
|
||||
# Hardening
|
||||
CapabilityBoundingSet = [ "" ];
|
||||
DeviceAllow = [ "" ];
|
||||
LockPersonality = true;
|
||||
PrivateDevices = true;
|
||||
PrivateTmp = true;
|
||||
PrivateUsers = true;
|
||||
ProtectClock = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectHome = true;
|
||||
ProtectHostname = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectProc = "invisible";
|
||||
RestrictAddressFamilies = [
|
||||
"AF_INET"
|
||||
"AF_INET6"
|
||||
];
|
||||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
SystemCallArchitectures = "native";
|
||||
UMask = "0077";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.streamConfig = ''
|
||||
server {
|
||||
listen 24454;
|
||||
proxy_pass 10.0.100.80:24454;
|
||||
}
|
||||
server {
|
||||
listen 24454 udp;
|
||||
proxy_pass 10.0.100.80:24454;
|
||||
}
|
||||
'';
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
25565
|
||||
24454 # Simple Voice Chat stepson
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
25565
|
||||
24454 # Simple Voice Chat stepson
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue