2023-06-16 22:18:53 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
Name: https://zim.fandom.com/wiki/GIR
|
|
|
|
Why: Gir used to have this role before, servers never die
|
|
|
|
Type: VM
|
|
|
|
Hardware: -
|
|
|
|
From: 2023
|
|
|
|
Role: Email Server
|
|
|
|
Notes:
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
{ pkgs, lib, nodes, ... }:
|
|
|
|
let
|
|
|
|
# name of the server, sets teh hostname and record for it
|
|
|
|
name = "gir";
|
|
|
|
ip_pub = "193.1.99.76";
|
|
|
|
hostname = "${name}.skynet.ie";
|
|
|
|
#hostname = ip_pub;
|
|
|
|
|
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
../applications/email.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
deployment = {
|
|
|
|
targetHost = hostname;
|
|
|
|
targetPort = 22;
|
|
|
|
targetUser = "root";
|
|
|
|
|
2023-07-26 22:53:26 +00:00
|
|
|
tags = [ "active-core" ];
|
2023-06-16 22:18:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# add this server to dns
|
2023-07-16 00:53:21 +00:00
|
|
|
skynet_dns.records = [
|
|
|
|
{record=name; r_type="A"; value=ip_pub; server=true;}
|
|
|
|
{record=ip_pub; r_type="PTR"; value=hostname;}
|
|
|
|
];
|
2023-06-16 22:18:53 +00:00
|
|
|
|
2023-07-15 14:05:57 +00:00
|
|
|
services.skynet_backup = {
|
|
|
|
host = {
|
|
|
|
ip = ip_pub;
|
|
|
|
name = name;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-06-16 22:18:53 +00:00
|
|
|
# we use this to pass in teh relevent infomation to the
|
|
|
|
services.skynet_email = {
|
|
|
|
enable = true;
|
|
|
|
host = {
|
|
|
|
ip = ip_pub;
|
|
|
|
name = name;
|
|
|
|
};
|
2023-07-16 02:30:06 +00:00
|
|
|
domain = "skynet.ie";
|
2023-06-16 22:18:53 +00:00
|
|
|
};
|
|
|
|
}
|