feat: properly modularised games
This commit is contained in:
parent
920f6ab86e
commit
95cdbf2b4e
3 changed files with 188 additions and 77 deletions
|
@ -21,7 +21,6 @@ let
|
|||
in {
|
||||
imports = [
|
||||
# applications for this particular server
|
||||
../applications/firewall.nix
|
||||
../applications/dns.nix
|
||||
../applications/games.nix
|
||||
|
||||
|
@ -38,27 +37,28 @@ in {
|
|||
targetUser = "root";
|
||||
};
|
||||
|
||||
# these two are to be able to add the rules for firewall and dns
|
||||
# open the firewall for this
|
||||
skynet_firewall.forward = [
|
||||
"ip daddr ${ip_pub} tcp dport 80 counter packets 0 bytes 0 accept"
|
||||
"ip daddr ${ip_pub} tcp dport 443 counter packets 0 bytes 0 accept"
|
||||
"ip daddr ${ip_pub} tcp dport 25565 counter packets 0 bytes 0 accept"
|
||||
];
|
||||
|
||||
skynet_dns.records = {
|
||||
external = [
|
||||
"${name} A ${ip_pub}"
|
||||
];
|
||||
cname = [
|
||||
# the games are each going to have a subdomain on this
|
||||
"games CNAME ${name}"
|
||||
];
|
||||
reverse = [
|
||||
"${builtins.substring 9 3 ip_pub} IN PTR ${name}"
|
||||
];
|
||||
};
|
||||
|
||||
services.skynet_games = {
|
||||
enable = true;
|
||||
|
||||
host = {
|
||||
# pass in teh ip (used for firewall)
|
||||
ip = ip_pub;
|
||||
|
||||
# the name is used for dns
|
||||
name = name;
|
||||
};
|
||||
};
|
||||
|
||||
# we use this to pass in teh relevent infomation to the
|
||||
services.skynet_ldap = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue