From fd875e4a2ecd24e889893f41cd236c8bfcfeb85a Mon Sep 17 00:00:00 2001 From: James Eversole Date: Tue, 27 Jun 2023 19:59:01 -0500 Subject: [PATCH] DNS Updates --- .gitignore | 1 + system/dns.nix | 31 ++++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 59dfe0e..0e21031 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.swp # Nix /result *qcow* diff --git a/system/dns.nix b/system/dns.nix index 9c5769b..1807e69 100644 --- a/system/dns.nix +++ b/system/dns.nix @@ -1,17 +1,38 @@ { config, ... }: { services = { coredns.enable = true; + # https://coredns.io/manual/configuration/ + # https://github.com/coredns/coredns.io/blob/master/content/manual/configuration.md coredns.config = '' - . { - forward . 9.9.9.9 149.112.112.112 84.200.69.80 84.200.70.40 - cache - } - matri.cx { template IN A { answer "{{ .Name }} 0 IN A 192.168.0.130" } } + + *.matri.cx { + template IN A { + answer "{{ .Name }} 0 IN A 192.168.0.130" + } + } + + eversole.co { + template IN A { + answer "{{ .Name }} 0 IN A 192.168.0.130" + } + } + + *.eversole.co { + template IN A { + answer "{{ .Name }} 0 IN A 192.168.0.130" + } + } + + . { + forward . 9.9.9.9 149.112.112.112 84.200.69.80 84.200.70.40 + cache + } + ''; }; }