feat: vendetta roughly set up for dns
This commit is contained in:
parent
15c5005b37
commit
f08f83e5c7
1 changed files with 31 additions and 2 deletions
|
@ -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
|
||||||
|
);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue