61 lines
935 B
Nix
61 lines
935 B
Nix
/*
|
|
|
|
Name: https://en.wikipedia.org/wiki/Optimus_Prime
|
|
Why: Created to sell toys so this vm is for games
|
|
Type: VM
|
|
Hardware: -
|
|
From: 2023
|
|
Role: Game host
|
|
Notes:
|
|
*/
|
|
{
|
|
pkgs,
|
|
lib,
|
|
nodes,
|
|
arion,
|
|
...
|
|
}: let
|
|
# name of the server, sets teh hostname and record for it
|
|
name = "optimus";
|
|
ip_pub = "193.1.99.112";
|
|
hostname = "${name}.skynet.ie";
|
|
host = {
|
|
ip = ip_pub;
|
|
name = name;
|
|
};
|
|
in {
|
|
imports = [
|
|
../applications/games.nix
|
|
];
|
|
|
|
deployment = {
|
|
targetHost = hostname;
|
|
targetPort = 22;
|
|
targetUser = null;
|
|
|
|
tags = ["active"];
|
|
};
|
|
|
|
services.skynet.dns.records = [
|
|
{
|
|
record = name;
|
|
r_type = "A";
|
|
value = ip_pub;
|
|
server = true;
|
|
}
|
|
{
|
|
record = ip_pub;
|
|
r_type = "PTR";
|
|
value = hostname;
|
|
}
|
|
];
|
|
|
|
services.skynet.backup = {
|
|
host = host;
|
|
};
|
|
|
|
services.skynet.games = {
|
|
enable = true;
|
|
host = host;
|
|
};
|
|
}
|