206 current 2025-10-10 02:17:13 25.05.20251006.20c4598 6.12.50 *
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# flake for blakes nixos config
|
# flake for blakes nixos config
|
||||||
# define new devices in outputs
|
# define new devices in outputs
|
||||||
# generation: 205 current 2025-10-10 02:16:29 25.05.20251006.20c4598 6.12.50 *
|
# generation: 206 current 2025-10-10 02:17:13 25.05.20251006.20c4598 6.12.50 *
|
||||||
{
|
{
|
||||||
description = "blakes nix config";
|
description = "blakes nix config";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ let
|
|||||||
cfg = config.modules.gameservers.${service};
|
cfg = config.modules.gameservers.${service};
|
||||||
sec = config.sops.secrets;
|
sec = config.sops.secrets;
|
||||||
servers = {
|
servers = {
|
||||||
velocity = { data_dir = "/var/lib/gameserver/minecraft_recpro/velocity"; ram = "2G"; };
|
velocity = { data_dir = "/var/lib/gameservers/minecraft_recpro/velocity"; ram = "2G"; };
|
||||||
smp = { data_dir = "/var/lib/gameserver/minecraft_recpro/smp"; ram = "12G"; };
|
smp = { data_dir = "/var/lib/gameservers/minecraft_recpro/smp"; ram = "12G"; };
|
||||||
superflat = { data_dir = "/var/lib/gameserver/minecraft_recpro/superflat"; ram = "4G"; };
|
superflat = { data_dir = "/var/lib/gameservers/minecraft_recpro/superflat"; ram = "4G"; };
|
||||||
bento = { data_dir = "/var/lib/gameserver/minecraft_recpro"; ram = "2G"; };
|
bento = { data_dir = "/var/lib/gameservers/minecraft_recpro"; ram = "2G"; };
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -63,8 +63,8 @@ in
|
|||||||
User = "minecraft";
|
User = "minecraft";
|
||||||
WorkingDirectory = srv.data_dir;
|
WorkingDirectory = srv.data_dir;
|
||||||
UMask = "0007";
|
UMask = "0007";
|
||||||
ExecStart = "${pkgs.tmux}/bin/tmux new-session -d -s ${name} '${pkgs.openjdk21}/bin/java -Xmx${srv.ram} -jar ${srv.data_dir}/server.jar nogui'";
|
ExecStart = "${pkgs.tmux}/bin/tmux new-session -d -s mcrp-${name} '${pkgs.openjdk21}/bin/java -Xmx${srv.ram} -jar ${srv.data_dir}/server.jar nogui'";
|
||||||
ExecStop = "${pkgs.tmux}/bin/tmux send-keys -t ${name} C-c"; # stop server by sending Ctrl+C to tmux session
|
ExecStop = "${pkgs.tmux}/bin/tmux send-keys -t mcrp-${name} C-c"; # stop server by sending Ctrl+C to tmux session
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
KillMode = "process";
|
KillMode = "process";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user