🔧 Add coredns configuration for tailscale network
This commit is contained in:
parent
1b83473c97
commit
41b3089314
@ -4,6 +4,8 @@
|
||||
imports = [ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
<home-manager/nixos>
|
||||
|
||||
../../modules/coredns
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
@ -20,8 +22,8 @@
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.enp10s0.useDHCP = true;
|
||||
networking.interfaces.enp9s0.useDHCP = true;
|
||||
networking.nameservers = [ "100.100.100.100" "1.1.1.1" ];
|
||||
networking.search = [ "walkah.net.beta.tailscale.net" ];
|
||||
networking.nameservers = [ "100.111.208.75" "1.1.1.1" ];
|
||||
networking.search = [ "walkah.lab" ];
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
@ -70,7 +72,7 @@
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
22
modules/coredns/default.nix
Normal file
22
modules/coredns/default.nix
Normal 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}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
18
modules/coredns/walkah.lab.zone
Normal file
18
modules/coredns/walkah.lab.zone
Normal 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
|
Loading…
x
Reference in New Issue
Block a user