2023-07-20 21:05:46 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
Name: https://en.wikipedia.org/wiki/Skynet_(Terminator)
|
|
|
|
Why: Skynet is eternal
|
|
|
|
Type: VM
|
|
|
|
Hardware: -
|
|
|
|
From: 2023
|
|
|
|
Role: Webserver and member linux box
|
2023-09-15 19:36:07 +00:00
|
|
|
Notes: Does not host offical sites
|
2023-07-20 21:05:46 +00:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
2023-07-21 20:27:01 +00:00
|
|
|
{ pkgs, lib, nodes, inputs, ... }:
|
2023-07-20 21:05:46 +00:00
|
|
|
let
|
|
|
|
name = "skynet";
|
|
|
|
# DMZ that ITD provided
|
|
|
|
ip_pub = "193.1.96.165";
|
|
|
|
hostname = "${name}.skynet.ie";
|
|
|
|
|
|
|
|
in {
|
2023-07-21 01:03:04 +00:00
|
|
|
imports = [
|
2023-09-15 19:36:07 +00:00
|
|
|
#../applications/skynet.ie.nix
|
2023-07-21 01:03:04 +00:00
|
|
|
];
|
2023-07-20 21:05:46 +00:00
|
|
|
|
|
|
|
deployment = {
|
2023-09-15 19:36:07 +00:00
|
|
|
targetHost = ip_pub;
|
2023-07-20 21:05:46 +00:00
|
|
|
targetPort = 22;
|
|
|
|
targetUser = "root";
|
|
|
|
|
2023-07-26 22:53:26 +00:00
|
|
|
tags = [ "active-core" ];
|
2023-07-20 21:05:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# it has two network devices so two
|
|
|
|
skynet_dns.records = [
|
2023-09-15 19:36:07 +00:00
|
|
|
{record=name; r_type="A"; value=ip_pub; server=true;}
|
|
|
|
{record=ip_pub; r_type="PTR"; value=hostname;}
|
2023-07-20 21:05:46 +00:00
|
|
|
];
|
|
|
|
|
2023-09-15 19:36:07 +00:00
|
|
|
services.skynet_backup.host = {
|
|
|
|
ip = ip_pub;
|
|
|
|
name = name;
|
2023-07-20 21:05:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# allow more than admins access
|
|
|
|
services.skynet_ldap_client = {
|
|
|
|
groups = [
|
|
|
|
"skynet-admins-linux"
|
|
|
|
"skynet-users-linux"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-07-21 01:03:04 +00:00
|
|
|
proxmoxLXC.manageNetwork = true;
|
2023-09-05 14:02:02 +00:00
|
|
|
networking = {
|
|
|
|
hostName = name;
|
|
|
|
# needed to use the dmz first
|
2023-09-15 19:36:07 +00:00
|
|
|
defaultGateway = lib.mkForce "193.1.96.161";
|
2023-09-05 14:02:02 +00:00
|
|
|
|
2023-09-15 19:36:07 +00:00
|
|
|
interfaces.eth1.ipv4.addresses = [
|
|
|
|
{
|
|
|
|
address = ip_pub;
|
|
|
|
prefixLength = 28;
|
|
|
|
}
|
|
|
|
];
|
2023-09-04 17:03:48 +00:00
|
|
|
};
|
2023-07-21 01:03:04 +00:00
|
|
|
|
2023-09-15 19:36:07 +00:00
|
|
|
# services.skynet = {
|
|
|
|
# host = {
|
|
|
|
# # website is still hosted on the internal IP
|
|
|
|
# ip = ip_priv;
|
|
|
|
# name = name;
|
|
|
|
# };
|
|
|
|
# };
|
2023-07-20 21:05:46 +00:00
|
|
|
}
|