diff --git a/machines/vendetta.nix b/machines/vendetta.nix index 3d5a41f..21ce467 100644 --- a/machines/vendetta.nix +++ b/machines/vendetta.nix @@ -18,11 +18,19 @@ let # hostname = "vendetta.skynet.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 { imports = [ # applications for this particular server - + ../applications/dns.nix ]; deployment = { @@ -31,6 +39,27 @@ in { 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 + ); + }; + }; }