2023-01-17 21:57:39 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
Name: https://masseffect.fandom.com/wiki/Vendetta
|
|
|
|
Why: Vendetta held troves of important data waiting for folks to request it.
|
|
|
|
Type: VM
|
|
|
|
Hardware: -
|
|
|
|
From: 2023
|
|
|
|
Role: DNS Server
|
|
|
|
Notes:
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
{ pkgs, lib, nodes, ... }:
|
|
|
|
let
|
|
|
|
# ip_pub = "193.1.99.120";
|
|
|
|
ip_pub = "192.168.1.157";
|
|
|
|
ip_priv = "172.20.20.3";
|
|
|
|
# hostname = "vendetta.skynet.ie";
|
|
|
|
hostname = "test01.home.brendan.ie";
|
|
|
|
|
2023-01-17 23:31:47 +00:00
|
|
|
# this server will have to have dns records
|
|
|
|
own = {
|
|
|
|
external = [
|
|
|
|
"vendetta A ${ip_pub}"
|
|
|
|
];
|
|
|
|
cname = [
|
|
|
|
#"misc CNAME vendetta"
|
|
|
|
];
|
|
|
|
};
|
2023-01-17 21:57:39 +00:00
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
# applications for this particular server
|
2023-01-17 23:31:47 +00:00
|
|
|
../applications/dns.nix
|
2023-01-17 21:57:39 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
deployment = {
|
|
|
|
targetHost = hostname;
|
|
|
|
targetPort = 22;
|
|
|
|
targetUser = "root";
|
|
|
|
};
|
|
|
|
|
2023-01-17 23:31:47 +00:00
|
|
|
skynet_dns = {
|
|
|
|
enable = true;
|
2023-01-17 21:57:39 +00:00
|
|
|
|
2023-01-17 23:31:47 +00:00
|
|
|
records = {
|
|
|
|
# using the same logic as the firewall, comments there
|
|
|
|
external = builtins.concatLists (
|
|
|
|
lib.attrsets.mapAttrsToList (key: value:
|
|
|
|
if value.config.deployment.hostname == hostname
|
|
|
|
then own.external
|
|
|
|
else value.config.skynet_dns.records.external
|
|
|
|
) nodes
|
|
|
|
);
|
|
|
|
|
|
|
|
cname = builtins.concatLists (
|
|
|
|
lib.attrsets.mapAttrsToList (key: value:
|
|
|
|
if value.config.deployment.hostname == hostname
|
|
|
|
then own.cname
|
|
|
|
else value.config.skynet_dns.records.cname
|
|
|
|
) nodes
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
2023-01-17 21:57:39 +00:00
|
|
|
|
|
|
|
}
|