nixos/applications/games.nix

87 lines
No EOL
2.2 KiB
Nix

{ ... }: {
imports = [];
/*
backups = [
"/etc/silver_satisfactory/config/"
"/etc/silver_valheim/config/"
];
*/
# since this is going to be pulled into a machiene that has skynet_dns we dont need to import it above
# gonna use it to create sub-subdomains for each game server
skynet_dns.records = {
external = [];
cname = [
# create a sub-subdomain for each game
"compsoc_classic.minecraft.games CNAME games"
"compsoc_test.minecraft.games CNAME games"
];
};
# arion is one way to use docker on nixos
virtualisation.arion = {
backend = "docker";
projects = {
# this is basically one single docker-compose file
minecraft.settings = {
docker-compose.raw.networks.default.name = "minecraft";
services = {
mc_proxy = {
service = {
image = "ghcr.io/haveachin/infrared:1.3.3";
environment = {
INFRARED_CONFIG_PATH = "/configs";
};
volumes = [ "/etc/games/minecraft/proxy:/configs" ];
ports = [
"25565:25565/tcp"
];
expose = [
"25565"
];
};
};
mc_compsoc = {
service = {
image = "nimmis/spigot:latest";
# setting these here as they arent special
environment = {
# this is what it last ran on
SPIGOT_VER="1.18.2";
EULA="true";
};
# where the config files are stored
volumes = [ "/etc/games/minecraft/compsoc/test/config:/minecraft" ];
};
};
mc_compsoc2 = {
service = {
image = "nimmis/spigot:latest";
environment = {
# this is what it last ran on
SPIGOT_VER="1.18.2";
EULA="true";
};
# where the config files are stored
volumes = [ "/etc/games/minecraft/compsoc/test2/config:/minecraft" ];
};
};
};
};
# next game here
};
};
}