From ea493b434b7687582f7c05b1b894d4bb813fa247 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Tue, 17 Jan 2023 23:37:07 +0000 Subject: [PATCH] fix: had to be in bind.zones --- applications/dns.nix | 122 ++++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/applications/dns.nix b/applications/dns.nix index 3ff2cd1..132868f 100644 --- a/applications/dns.nix +++ b/applications/dns.nix @@ -43,71 +43,73 @@ in { "193.1.100.131" ]; - /* - put any other zones above skynet and link to their files like so: + zones = { + /* + put any other zones above skynet and link to their files like so: - example.ie = { + example.ie = { + extraConfig = ""; + file = ./dns/example; + master = true; + masters = []; + slaves = [ ]; + }; + + Skynet is handled a bit more dynamically since it is the key one we should focus on + */ + + "skynet.ie" = { extraConfig = ""; - file = ./dns/example; + # really wish teh nixos config didnt use master/slave master = true; - masters = []; + masters = [ ]; slaves = [ ]; + + file = '' + $TTL 60 ; 1 minute + ; hostmaster@skynet.ie is an email address that recieves stuff related to dns + @ IN SOA ns1.skynet.ie. hostmaster.skynet.ie. ( + 2023011701 ; Serial (YYYYMMDDCC) + 600 ; Refresh (10 minutes) + 300 ; Retry (5 minutes) + 2419200 ; Expire (4 weeks) + 3600 ; Minimum (1 hour) + ) + NS ns1.skynet.ie. + NS ns2.skynet.ie. + ; @ stands for teh root domain so teh A record below is where skynet.ie points to + A 193.1.99.76 + MX 5 mail.skynet.ie. + + ; can have multiple mailserves + ;MX 20 mail2.skynet.ie. + + + ; ------------------------------------------ + ; Server Names + ; ------------------------------------------ + + ; External addresses + ; ------------------------------------------ + ${lib.strings.concatMapStrings (x: x + "\n") cfg.records.external} + + + ; this is fixed for now + wintermute A 193.1.101.148 + + + ; internal addresses + ; ------------------------------------------ + ; May come back to this idea in teh future + ; agentjones.int A 172.20.20.1 + + + ; cname's + ; ------------------------------------------ + ${lib.strings.concatMapStrings (x: x + "\n") cfg.records.cname} + + ''; }; - - Skynet is handled a bit more dynamically since it is the key one we should focus on - */ - - skynet.ie = { - extraConfig = ""; - # really wish teh nixos config didnt use master/slave - master = true; - masters = [ ]; - slaves = [ ]; - - file = '' - $TTL 60 ; 1 minute - ; hostmaster@skynet.ie is an email address that recieves stuff related to dns - @ IN SOA ns1.skynet.ie. hostmaster.skynet.ie. ( - 2023011701 ; Serial (YYYYMMDDCC) - 600 ; Refresh (10 minutes) - 300 ; Retry (5 minutes) - 2419200 ; Expire (4 weeks) - 3600 ; Minimum (1 hour) - ) - NS ns1.skynet.ie. - NS ns2.skynet.ie. - ; @ stands for teh root domain so teh A record below is where skynet.ie points to - A 193.1.99.76 - MX 5 mail.skynet.ie. - - ; can have multiple mailserves - ;MX 20 mail2.skynet.ie. - - - ; ------------------------------------------ - ; Server Names - ; ------------------------------------------ - - ; External addresses - ; ------------------------------------------ - ${lib.strings.concatMapStrings (x: x + "\n") cfg.records.external} - - - ; this is fixed for now - wintermute A 193.1.101.148 - - - ; internal addresses - ; ------------------------------------------ - ; May come back to this idea in teh future - ; agentjones.int A 172.20.20.1 - - - ; cname's - ; ------------------------------------------ - ${lib.strings.concatMapStrings (x: x + "\n") cfg.records.cname} - - ''; }; };