feat: added a formatter and some instructions
This commit is contained in:
parent
14ae0a9065
commit
7f3dc8946e
39 changed files with 1739 additions and 1348 deletions
|
@ -1,12 +1,16 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.skynet_games_minecraft;
|
||||
|
||||
# got tired of how long this is so I created a var for it.
|
||||
short_domain = "${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}";
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.services.skynet_games_minecraft;
|
||||
|
||||
# got tired of how long this is so I created a var for it.
|
||||
short_domain = "${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}";
|
||||
in {
|
||||
imports = [
|
||||
../acme.nix
|
||||
../dns.nix
|
||||
|
@ -54,21 +58,41 @@
|
|||
];
|
||||
|
||||
skynet_acme.domains = [
|
||||
"${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}"
|
||||
"${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}"
|
||||
"*.${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}"
|
||||
];
|
||||
|
||||
skynet_dns.records = [
|
||||
# the minecraft (web) config server
|
||||
{record="config.${cfg.domain.sub}"; r_type="CNAME"; value=cfg.host.name;}
|
||||
{
|
||||
record = "config.${cfg.domain.sub}";
|
||||
r_type = "CNAME";
|
||||
value = cfg.host.name;
|
||||
}
|
||||
|
||||
# our own minecraft hosts
|
||||
{record="compsoc_classic.${cfg.domain.sub}"; r_type="CNAME"; value=cfg.host.name;}
|
||||
{record="compsoc.${cfg.domain.sub}"; r_type="CNAME"; value=cfg.host.name;}
|
||||
{
|
||||
record = "compsoc_classic.${cfg.domain.sub}";
|
||||
r_type = "CNAME";
|
||||
value = cfg.host.name;
|
||||
}
|
||||
{
|
||||
record = "compsoc.${cfg.domain.sub}";
|
||||
r_type = "CNAME";
|
||||
value = cfg.host.name;
|
||||
}
|
||||
|
||||
# gsoc servers
|
||||
{record="gsoc.${cfg.domain.sub}"; r_type="CNAME"; value=cfg.host.name;}
|
||||
{record="gsoc_abridged.${cfg.domain.sub}"; r_type="CNAME"; value=cfg.host.name;}
|
||||
{
|
||||
record = "gsoc.${cfg.domain.sub}";
|
||||
r_type = "CNAME";
|
||||
value = cfg.host.name;
|
||||
}
|
||||
{
|
||||
record = "gsoc_abridged.${cfg.domain.sub}";
|
||||
r_type = "CNAME";
|
||||
value = cfg.host.name;
|
||||
}
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
|
@ -77,7 +101,6 @@
|
|||
];
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
|
||||
# https://config.minecraft.games.skynet.ie
|
||||
"config.${short_domain}" = {
|
||||
forceSSL = true;
|
||||
|
@ -94,7 +117,6 @@
|
|||
useACMEHost = "skynet";
|
||||
locations."/map/".alias = "/etc/games/minecraft/craftycontrol/servers/f4c5eb33-c6d6-421c-81ab-ded31f6e8750/plugins/dynmap/web/";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# arion is one way to use docker on nixos
|
||||
|
@ -103,12 +125,11 @@
|
|||
virtualisation.arion = {
|
||||
backend = "docker";
|
||||
projects = {
|
||||
|
||||
minecraft.settings.services = {
|
||||
mc_proxy.service = {
|
||||
image = "itzg/mc-router:1.18.0";
|
||||
ports = [ "25565:25565/tcp" ];
|
||||
expose = [ "25565" ];
|
||||
ports = ["25565:25565/tcp"];
|
||||
expose = ["25565"];
|
||||
command = [
|
||||
"--mapping=compsoc_classic.${short_domain}=mc_config:20000,compsoc.${short_domain}=mc_config:20001,gsoc.${short_domain}=mc_config:20002,gsoc.${short_domain}=mc_config:20002,gsoc_abridged.${short_domain}=mc_config:20003"
|
||||
];
|
||||
|
@ -118,7 +139,7 @@
|
|||
image = "registry.gitlab.com/crafty-controller/crafty-4:4.1.1";
|
||||
|
||||
environment = {
|
||||
TZ="Etc/UTC";
|
||||
TZ = "Etc/UTC";
|
||||
};
|
||||
|
||||
volumes = [
|
||||
|
@ -144,4 +165,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue