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
# This decoupling makes it easier to put one service on another host.
{ pkgs, lib, config, dns, ... }@inputs:
{ lib, config, ... }@inputs:
let
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
{
options.lab.networking.dmz.services.enable = lib.mkOption {
@ -29,26 +22,6 @@ in
};
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 = {
enable = true;
settings = import ./dnsmasq.nix inputs;

View file

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