Compare commits
No commits in common. "cf5041d5a3d001bc33b08b5d8ce7e62a8628060e" and "b34b4bf153228222b52c5d9837855dbebf6af85c" have entirely different histories.
cf5041d5a3
...
b34b4bf153
5 changed files with 11 additions and 187 deletions
|
|
@ -1,67 +0,0 @@
|
||||||
## ##
|
|
||||||
## EasyAuth ##
|
|
||||||
## Extended Configuration ##
|
|
||||||
## ##
|
|
||||||
|
|
||||||
# Block everything for unauthenticated players
|
|
||||||
allow-chat = false
|
|
||||||
allow-commands = false
|
|
||||||
allowed-commands = []
|
|
||||||
allow-movement = false
|
|
||||||
allow-block-interaction = false
|
|
||||||
allow-entity-interaction = false
|
|
||||||
allow-block-breaking = false
|
|
||||||
allow-entity-attacking = false
|
|
||||||
allow-item-dropping = false
|
|
||||||
allow-item-moving = false
|
|
||||||
allow-item-using = false
|
|
||||||
|
|
||||||
# Hide inventory while not logged in
|
|
||||||
hide-inventory = true
|
|
||||||
|
|
||||||
# Unauthenticated players are invulnerable and ignored by mobs
|
|
||||||
player-invulnerable = true
|
|
||||||
player-ignored = true
|
|
||||||
|
|
||||||
# Rate limit teleportation for unauthed players
|
|
||||||
teleportation-timeout-ms = 20
|
|
||||||
|
|
||||||
# Command aliases
|
|
||||||
aliases {
|
|
||||||
# /l for /login
|
|
||||||
login = true
|
|
||||||
# /reg for /register
|
|
||||||
register = true
|
|
||||||
}
|
|
||||||
|
|
||||||
# Try to rescue players stuck in portals
|
|
||||||
try-portal-rescue = true
|
|
||||||
|
|
||||||
# Password length limits
|
|
||||||
min-password-length = 6
|
|
||||||
max-password-length = 128
|
|
||||||
|
|
||||||
# Username validation
|
|
||||||
username-regexp = "^[a-zA-Z]{1,16}$"
|
|
||||||
|
|
||||||
# No Floodgate
|
|
||||||
floodgate-bypass-regex = false
|
|
||||||
|
|
||||||
# Prevent same-name kicks
|
|
||||||
prevent-another-location-kick = true
|
|
||||||
|
|
||||||
# Don't force offline UUIDs (already in offline mode)
|
|
||||||
forced-offline-uuid = false
|
|
||||||
|
|
||||||
# Don't skip auth
|
|
||||||
skip-all-auth-checks = false
|
|
||||||
|
|
||||||
# Disallow case-insensitive duplicate usernames
|
|
||||||
allow-case-insensitive-username = false
|
|
||||||
|
|
||||||
# Prompt to authenticate every 10 seconds
|
|
||||||
authentication-prompt-interval = 10
|
|
||||||
|
|
||||||
# Log registration and login events
|
|
||||||
log-player-registration = true
|
|
||||||
log-player-login = true
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
## ##
|
|
||||||
## EasyAuth ##
|
|
||||||
## Main Configuration ##
|
|
||||||
## ##
|
|
||||||
|
|
||||||
# Don't auto-login players with Microsoft accounts — treat everyone the same
|
|
||||||
premium-auto-login = false
|
|
||||||
|
|
||||||
# All players are offline players
|
|
||||||
offline-by-default = true
|
|
||||||
|
|
||||||
# No Bedrock auto-login
|
|
||||||
floodgate-auto-login = false
|
|
||||||
|
|
||||||
# Session timeout: 24 hours (if they reconnect within this time, no re-login needed)
|
|
||||||
session-timeout = 86400
|
|
||||||
|
|
||||||
# Max login attempts before kick
|
|
||||||
max-login-tries = 3
|
|
||||||
|
|
||||||
# 5 minutes to authenticate before being kicked
|
|
||||||
kick-timeout = 300
|
|
||||||
|
|
||||||
# 2 minutes before they can rejoin after being kicked for failed attempts
|
|
||||||
reset-login-attempts-timeout = 120
|
|
||||||
|
|
||||||
# Registration is disabled for players — admin-only via `auth register <user> <pass>`
|
|
||||||
# With enable-global-password=true and single-use-global-password=false,
|
|
||||||
# the /register command is disabled. Players can only /login with a password set by admin.
|
|
||||||
enable-global-password = true
|
|
||||||
single-use-global-password = false
|
|
||||||
|
|
||||||
# Hide player coordinates during auth (teleport to spawn)
|
|
||||||
hide-player-coords = true
|
|
||||||
|
|
||||||
# Hide unauthenticated players from everyone (requires Vanish mod)
|
|
||||||
vanish-until-auth = true
|
|
||||||
|
|
||||||
# Auth spawn location — players teleported here until authenticated
|
|
||||||
world-spawn {
|
|
||||||
dimension = "minecraft:overworld"
|
|
||||||
x = -1965
|
|
||||||
y = 167
|
|
||||||
z = 1109
|
|
||||||
yaw = 0
|
|
||||||
pitch = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
debug = false
|
|
||||||
|
|
||||||
config-version = 2
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
{
|
|
||||||
"language": "en_us",
|
|
||||||
"refreshSkinOnJoin": true,
|
|
||||||
"skinApplyDelayOnJoin": 0,
|
|
||||||
"fetchSkinOnFirstJoin": false,
|
|
||||||
"forceFirstJoinSkinFetch": false,
|
|
||||||
"firstJoinSkinProvider": "mojang",
|
|
||||||
"proxy": "",
|
|
||||||
"requestTimeout": 10,
|
|
||||||
"providers": {
|
|
||||||
"mojang": {
|
|
||||||
"enabled": true,
|
|
||||||
"cache": {
|
|
||||||
"enabled": true,
|
|
||||||
"expireAfterWrite": 86400
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ely_by": {
|
|
||||||
"enabled": true,
|
|
||||||
"cache": {
|
|
||||||
"enabled": true,
|
|
||||||
"expireAfterWrite": 86400
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mineskin": {
|
|
||||||
"enabled": true,
|
|
||||||
"cache": {
|
|
||||||
"enabled": true,
|
|
||||||
"expireAfterWrite": 86400
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"collection": {
|
|
||||||
"enabled": false,
|
|
||||||
"cache": {
|
|
||||||
"enabled": true,
|
|
||||||
"expireAfterWrite": 604800
|
|
||||||
},
|
|
||||||
"sources": []
|
|
||||||
},
|
|
||||||
"custom": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
21
flake.nix
21
flake.nix
|
|
@ -23,18 +23,6 @@
|
||||||
mcLogs = pkgs.writeShellScriptBin "mc-logs" ''
|
mcLogs = pkgs.writeShellScriptBin "mc-logs" ''
|
||||||
ssh root@compsigh-minecraft "docker logs --tail ''${1:-100} -f minecraft"
|
ssh root@compsigh-minecraft "docker logs --tail ''${1:-100} -f minecraft"
|
||||||
'';
|
'';
|
||||||
mcRegister = pkgs.writeShellScriptBin "mc-register" ''
|
|
||||||
set -euo pipefail
|
|
||||||
USERNAME="''${1:?Usage: mc-register <username> <password>}"
|
|
||||||
PASSWORD="''${2:?Usage: mc-register <username> <password>}"
|
|
||||||
ssh root@compsigh-minecraft "docker exec minecraft rcon-cli auth register $USERNAME $PASSWORD"
|
|
||||||
'';
|
|
||||||
mcUpdatePassword = pkgs.writeShellScriptBin "mc-update-password" ''
|
|
||||||
set -euo pipefail
|
|
||||||
USERNAME="''${1:?Usage: mc-update-password <username> <password>}"
|
|
||||||
PASSWORD="''${2:?Usage: mc-update-password <username> <password>}"
|
|
||||||
ssh root@compsigh-minecraft "docker exec minecraft rcon-cli auth update $USERNAME $PASSWORD"
|
|
||||||
'';
|
|
||||||
bootstrap = pkgs.writeShellScriptBin "mc-bootstrap" ''
|
bootstrap = pkgs.writeShellScriptBin "mc-bootstrap" ''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IP="''${1:?Usage: mc-bootstrap <server-ip>}"
|
IP="''${1:?Usage: mc-bootstrap <server-ip>}"
|
||||||
|
|
@ -82,12 +70,17 @@
|
||||||
deploy
|
deploy
|
||||||
bootstrap
|
bootstrap
|
||||||
mcLogs
|
mcLogs
|
||||||
mcRegister
|
|
||||||
mcUpdatePassword
|
|
||||||
pkgs.nh
|
pkgs.nh
|
||||||
inputs.agenix.packages.${system}.default
|
inputs.agenix.packages.${system}.default
|
||||||
];
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
echo "compsigh minecraft server"
|
||||||
|
echo " mc-bootstrap — first-time install (mc-bootstrap <ip>)"
|
||||||
|
echo " nhs — deploy to server"
|
||||||
|
echo " mc-logs — tail server logs"
|
||||||
|
echo " agenix — manage secrets"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,6 @@ let
|
||||||
"threadtweak"
|
"threadtweak"
|
||||||
"crashexploitfixer"
|
"crashexploitfixer"
|
||||||
|
|
||||||
# Authentication & skins
|
|
||||||
"easyauth"
|
|
||||||
"skinrestorer"
|
|
||||||
"vanish"
|
|
||||||
|
|
||||||
# Anti-cheat
|
# Anti-cheat
|
||||||
"anti-xray"
|
"anti-xray"
|
||||||
"grimac"
|
"grimac"
|
||||||
|
|
@ -114,9 +109,10 @@ in
|
||||||
SIMULATION_DISTANCE = "10";
|
SIMULATION_DISTANCE = "10";
|
||||||
SPAWN_PROTECTION = "0";
|
SPAWN_PROTECTION = "0";
|
||||||
ALLOW_FLIGHT = "TRUE";
|
ALLOW_FLIGHT = "TRUE";
|
||||||
ENABLE_WHITELIST = "FALSE";
|
ENABLE_WHITELIST = "TRUE";
|
||||||
ENFORCE_WHITELIST = "FALSE";
|
ENFORCE_WHITELIST = "TRUE";
|
||||||
ONLINE_MODE = "FALSE";
|
WHITELIST = "jetpham";
|
||||||
|
OPS = "jetpham";
|
||||||
MOTD = "meet cool people \\u00A76\\u0026\\u0026\\u00A7r build cool things";
|
MOTD = "meet cool people \\u00A76\\u0026\\u0026\\u00A7r build cool things";
|
||||||
OVERRIDE_ICON = "TRUE";
|
OVERRIDE_ICON = "TRUE";
|
||||||
REMOVE_OLD_MODS = "TRUE";
|
REMOVE_OLD_MODS = "TRUE";
|
||||||
|
|
@ -155,11 +151,6 @@ in
|
||||||
cp ${../server-icon.png} ${mcDataDir}/server-icon.png
|
cp ${../server-icon.png} ${mcDataDir}/server-icon.png
|
||||||
mkdir -p ${mcDataDir}/config
|
mkdir -p ${mcDataDir}/config
|
||||||
cp ${../configs/anti-xray.toml} ${mcDataDir}/config/anti-xray.toml
|
cp ${../configs/anti-xray.toml} ${mcDataDir}/config/anti-xray.toml
|
||||||
mkdir -p ${mcDataDir}/config/skinrestorer
|
|
||||||
cp ${../configs/skinrestorer-config.json} ${mcDataDir}/config/skinrestorer/config.json
|
|
||||||
mkdir -p ${mcDataDir}/config/EasyAuth
|
|
||||||
cp ${../configs/easyauth-main.conf} ${mcDataDir}/config/EasyAuth/main.conf
|
|
||||||
cp ${../configs/easyauth-extended.conf} ${mcDataDir}/config/EasyAuth/extended.conf
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue