Compare commits

...

2 Commits

Author SHA1 Message Date
ab2d164266
catarina: papermc: stargate plugin 2024-02-09 19:15:17 +05:00
869c2c5978
catarina: restict ssh kbd interactive auth 2024-02-09 19:14:20 +05:00
4 changed files with 27 additions and 4 deletions

View File

@ -67,6 +67,7 @@
enable = true; enable = true;
startWhenNeeded = true; startWhenNeeded = true;
settings.PasswordAuthentication = false; settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
}; };
services.udev = { services.udev = {

View File

@ -66,6 +66,7 @@ rec {
enable = true; enable = true;
startWhenNeeded = true; startWhenNeeded = true;
settings.PasswordAuthentication = false; settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
}; };
services.udev = { services.udev = {

View File

@ -109,7 +109,7 @@
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 80 443 3001 25600 ]; allowedTCPPorts = [ 80 443 3001 25600 8080 ];
}; };
interfaces.enp9s0.ipv4.addresses = [ { interfaces.enp9s0.ipv4.addresses = [ {

View File

@ -13,6 +13,11 @@ let
uuid = "6fa9251d-11a5-33ad-ada3-312f0632eab1"; uuid = "6fa9251d-11a5-33ad-ada3-312f0632eab1";
level = 3; level = 3;
} }
{
name = "DiAlteri";
uuid = "0a278f5c-7192-30c8-aa2f-af157c348009";
level = 3;
}
]; ];
operators = lib.filter (player: player.level > 0) playerlist; operators = lib.filter (player: player.level > 0) playerlist;
@ -125,8 +130,23 @@ let
''; '';
}; };
stargate = stdenv.mkDerivation rec {
pname = "Stargate";
version = "0.11.5.6";
src = fetchurl {
url = "https://hangarcdn.papermc.io/plugins/Stargate/Stargate/versions/${version}/PAPER/Stargate-${version}.jar";
hash = "sha256-Ilz0z3juQ9c4/pUnHnvJO+PnJF1+vXBxW2pbERuEBo4=";
};
meta.homepage = "https://hangar.papermc.io/Stargate/Stargate";
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/${pname}.jar
'';
};
plugins = [ plugins = [
passky grimAnticheat viaVersion directionHUD miniMOTD skinRestorer squaremap passky grimAnticheat viaVersion directionHUD miniMOTD skinRestorer squaremap stargate
]; ];
in { in {
@ -146,14 +166,14 @@ in {
online-mode = false; online-mode = false;
enable-rcon = true; enable-rcon = true;
"rcon.port" = 25600; "rcon.port" = 25600;
white-list = true; white-list = false;
}; };
rconPasswordFile = config.sops.secrets."papermc/rcon".path; rconPasswordFile = config.sops.secrets."papermc/rcon".path;
whitelist = whitelist; whitelist = whitelist;
ops = operators; ops = operators;
extraPreStart = '' extraPreStart = ''
mkdir -p ${builtins.concatStringsSep " " (map (v: "plugins/${v.pname}") plugins)} mkdir -p ${builtins.concatStringsSep " " (map (v: "plugins/${v.pname}") plugins)}
'' + builtins.concatStringsSep "\n" (map (v: "ln -s ${v.outPath}/bin/${v.pname}.jar plugins/") plugins) '' + builtins.concatStringsSep "\n" (map (v: "ln -sf ${v.outPath}/bin/${v.pname}.jar plugins/") plugins)
; ;
}; };
@ -162,4 +182,5 @@ in {
useACMEHost = "elnafo.ru"; useACMEHost = "elnafo.ru";
locations."/".proxyPass = "http://127.0.0.1:8088"; locations."/".proxyPass = "http://127.0.0.1:8088";
}; };
} }