🔧 Add coredns configuration for tailscale network

This commit is contained in:
James Walker 2021-03-15 22:26:07 -04:00
parent 1b83473c97
commit 41b3089314
Signed by: walkah
GPG Key ID: 3C127179D6086E93
3 changed files with 45 additions and 3 deletions

View File

@ -4,6 +4,8 @@
imports = [ # Include the results of the hardware scan. imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
<home-manager/nixos> <home-manager/nixos>
../../modules/coredns
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
@ -20,8 +22,8 @@
networking.useDHCP = false; networking.useDHCP = false;
networking.interfaces.enp10s0.useDHCP = true; networking.interfaces.enp10s0.useDHCP = true;
networking.interfaces.enp9s0.useDHCP = true; networking.interfaces.enp9s0.useDHCP = true;
networking.nameservers = [ "100.100.100.100" "1.1.1.1" ]; networking.nameservers = [ "100.111.208.75" "1.1.1.1" ];
networking.search = [ "walkah.net.beta.tailscale.net" ]; networking.search = [ "walkah.lab" ];
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
@ -70,7 +72,7 @@
# networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
# networking.firewall.enable = false; networking.firewall.enable = false;
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions

View File

@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
{
services.coredns = {
enable = true;
config = ''
. {
log
errors
cache
dnssec
forward . tls://1.1.1.1 tls://1.0.0.1 {
tls_servername cloudflare-dns.com
}
}
walkah.lab {
file ${./walkah.lab.zone}
}
'';
};
}

View File

@ -0,0 +1,18 @@
$ORIGIN walkah.lab.
@ 3600 IN SOA plato.walkah.lab. walkah.walkah.net. (
2020042900 ; serial
7200 ; refresh (2 hours)
3600 ; retry (1 hour)
1209600 ; expire (2 weeks)
3600 ; minimum (1 hour)
)
socrates IN A 100.103.57.96
plato IN A 100.111.208.75
; aristotle
agent IN A 100.73.53.115
form IN A 100.124.46.121
matter IN A 100.77.198.4
purpose IN A 100.103.26.74
epicurus IN A 100.66.26.116