nixos/machines/optimus.nix

96 lines
1.7 KiB
Nix
Raw Normal View History

2023-01-25 11:48:44 +00:00
/*
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";
ip_priv = "172.20.20.7";
hostname = "${name}.skynet.ie";
2023-01-25 11:48:44 +00:00
in {
imports = [
# applications for this particular server
../applications/dns.nix
../applications/games.nix
2023-05-18 20:59:23 +00:00
2023-05-21 00:38:19 +00:00
../applications/ldap_client.nix
2023-05-18 20:59:23 +00:00
# for testing
../applications/ldap.nix
../applications/gitlab.nix
2023-01-25 11:48:44 +00:00
];
deployment = {
targetHost = hostname;
targetPort = 22;
targetUser = "root";
};
skynet_dns.records = {
external = [
"${name} A ${ip_pub}"
];
2023-05-21 18:05:47 +00:00
reverse = [
"${builtins.substring 9 3 ip_pub} IN PTR ${name}"
];
2023-01-25 11:48:44 +00:00
};
2023-05-24 15:39:02 +00:00
services.skynet_games = {
enable = true;
host = {
# pass in teh ip (used for firewall)
ip = ip_pub;
# the name is used for dns
name = name;
};
};
2023-05-18 20:59:23 +00:00
# we use this to pass in teh relevent infomation to the
services.skynet_ldap = {
enable = true;
host = {
# pass in teh ip (used for firewall)
ip = ip_pub;
# the name is used for dns
name = name;
};
};
2023-05-21 00:38:19 +00:00
services.skynet_ldap_client = {
enable = true;
# skynet-admin will always be added
groups = [ "skynet-users"];
2023-05-18 20:59:23 +00:00
};
services.skynet_gitlab = {
enable = true;
host = {
# pass in teh ip (used for firewall)
ip = ip_pub;
# the name is used for dns
name = name;
};
};
2023-05-21 00:38:19 +00:00
}