feat: retiring Optimus and teh games server that was hosted on it.
Now fully using Pterodactyl
This commit is contained in:
parent
1fb2bba4ce
commit
cbc5af9b53
6 changed files with 2 additions and 5 deletions
70
applications/_retired/games.nix
Normal file
70
applications/_retired/games.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
name = "games";
|
||||
cfg = config.services.skynet."${name}";
|
||||
in {
|
||||
imports = [
|
||||
./dns.nix
|
||||
./nginx.nix
|
||||
./games/minecraft.nix
|
||||
];
|
||||
|
||||
options.services.skynet."${name}" = {
|
||||
enable = mkEnableOption "Skynet Games";
|
||||
|
||||
domain = {
|
||||
tld = mkOption {
|
||||
type = types.str;
|
||||
default = "ie";
|
||||
};
|
||||
|
||||
base = mkOption {
|
||||
type = types.str;
|
||||
default = "skynet";
|
||||
};
|
||||
|
||||
sub = mkOption {
|
||||
type = types.str;
|
||||
default = "games";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.skynet.dns.records = [
|
||||
# need a base domain
|
||||
{
|
||||
record = cfg.domain.sub;
|
||||
r_type = "CNAME";
|
||||
value = config.services.skynet.host.name;
|
||||
}
|
||||
];
|
||||
|
||||
services.skynet.acme.domains = [
|
||||
"${cfg.domain.sub}.skynet.ie"
|
||||
];
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"${cfg.domain.sub}.skynet.ie" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "skynet";
|
||||
root = "${inputs.skynet_website_games.defaultPackage.x86_64-linux}";
|
||||
};
|
||||
};
|
||||
|
||||
# the minecraft servers
|
||||
services.skynet.games_minecraft = {
|
||||
enable = true;
|
||||
|
||||
domain = {
|
||||
sub = "minecraft.${cfg.domain.sub}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue