feat: vendetta roughly set up for dns

This commit is contained in:
silver 2023-01-17 23:31:47 +00:00
parent 15c5005b37
commit f08f83e5c7

View file

@ -18,11 +18,19 @@ let
# hostname = "vendetta.skynet.ie"; # hostname = "vendetta.skynet.ie";
hostname = "test01.home.brendan.ie"; hostname = "test01.home.brendan.ie";
# this server will have to have dns records
own = {
external = [
"vendetta A ${ip_pub}"
];
cname = [
#"misc CNAME vendetta"
];
};
in { in {
imports = [ imports = [
# applications for this particular server # applications for this particular server
../applications/dns.nix
]; ];
deployment = { deployment = {
@ -31,6 +39,27 @@ in {
targetUser = "root"; targetUser = "root";
}; };
skynet_dns = {
enable = true;
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
);
};
};
} }