move to kubernetes DNS

This commit is contained in:
Pim Kunis 2024-04-11 21:30:26 +02:00
parent 0d9ebf9358
commit ffc8db4f03
2 changed files with 2 additions and 34 deletions

View file

@ -1,13 +1,6 @@
# TODO: we should split this into DHCP and DNS { lib, config, ... }@inputs:
# This decoupling makes it easier to put one service on another host.
{ pkgs, lib, config, dns, ... }@inputs:
let let
cfg = config.lab.networking.dmz.services; cfg = config.lab.networking.dmz.services;
kunisZoneFile = pkgs.writeTextFile {
name = "kunis-zone-file";
text = (dns.lib.toString "kun.is" (import ./zones/kun.is.nix inputs));
};
in in
{ {
options.lab.networking.dmz.services.enable = lib.mkOption { options.lab.networking.dmz.services.enable = lib.mkOption {
@ -29,26 +22,6 @@ in
}; };
services = { services = {
bind = {
enable = true;
forwarders = [ ];
extraOptions = ''
allow-transfer { none; };
allow-recursion { none; };
version none;
notify no;
'';
zones = {
"kun.is" = {
master = true;
file = kunisZoneFile;
allowQuery = [ "any" ];
};
};
};
dnsmasq = { dnsmasq = {
enable = true; enable = true;
settings = import ./dnsmasq.nix inputs; settings = import ./dnsmasq.nix inputs;

View file

@ -17,13 +17,11 @@ in
port = "5353"; port = "5353";
host-record = [ host-record = [
"hermes.dmz,${cfg.dmz.ipv4.services},${cfg.dmz.ipv6.services}" "hermes.dmz,${cfg.dmz.ipv4.services},${cfg.dmz.ipv6.services}"
"ipv4.hermes.dmz,${cfg.dmz.ipv4.services}" # TODO: Do we need these?
"ipv6.hermes.dmz,${cfg.dmz.ipv6.services}"
]; ];
server = [ server = [
cfg.dmz.ipv4.router cfg.dmz.ipv4.router
"/kun.is/${cfg.dmz.ipv4.services}" "/kun.is/192.168.30.134"
]; ];
dhcp-range = [ dhcp-range = [
@ -33,7 +31,6 @@ in
dhcp-host = [ dhcp-host = [
"b8:27:eb:b9:ab:e2,esrom" "b8:27:eb:b9:ab:e2,esrom"
"ba:db:ee:f0:00:01,maestro,${cfg.dmz.ipv4.dockerSwarm}"
]; ];
dhcp-option = [ dhcp-option = [
@ -43,8 +40,6 @@ in
]; ];
address = [ address = [
"/ns.pizzapim.nl/${cfg.dmz.ipv4.services}"
"/ns.pizzapim.nl/${cfg.dmz.ipv6.services}"
"/kms.kun.is/192.168.30.129" "/kms.kun.is/192.168.30.129"
"/ssh.git.kun.is/192.168.30.132" "/ssh.git.kun.is/192.168.30.132"
]; ];