diff --git a/dns.nix b/dns.nix new file mode 100644 index 0000000..8ef5c6b --- /dev/null +++ b/dns.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +let + zonefile = builtins.toFile "obx.zone" (builtins.readFile ./obx.zone); +in { + services.coredns = { + enable = true; + config = '' + . { + errors + log . { + class error + } + file ${zonefile} obx. + cache 30 { + disable success cluster.local + disable denial cluster.local + } + header { + response set ra + } + forward . 8.8.8.8 8.8.4.4 + loop + reload + } + ''; + }; +} diff --git a/relays/obx.zone b/obx.zone similarity index 99% rename from relays/obx.zone rename to obx.zone index 1e323c7..28032e5 100644 --- a/relays/obx.zone +++ b/obx.zone @@ -12,6 +12,7 @@ ns2 IN A 100.64.0.28 $ORIGIN svc.obx. slurmctld IN A 127.0.0.1 _slurmctld._tcp IN SRV 0 5 6817 slurmctld.svc.obx. +slurmdb IN A 10.255.241.15 $ORIGIN ceph.tos.obx. ingress IN A 10.255.241.10 @@ -37,7 +38,7 @@ otel-collector IN A 10.255.241.12 staging-rabbitmq IN A 10.255.241.13 rabbitmq IN A 10.255.241.14 prod-rabbitmq IN A 10.255.241.14 -slurm IN A 10.255.241.15 +slurmdb IN A 10.255.241.15 control-plane-1 IN A 10.255.241.201 control-plane-2 IN A 10.255.241.202 diff --git a/relays/default.nix b/relays/default.nix index 8ae9a4c..f971057 100644 --- a/relays/default.nix +++ b/relays/default.nix @@ -1,7 +1,5 @@ { pkgs, ... }: -let - zonefile = builtins.toFile "obx.zone" (builtins.readFile ./obx.zone); -in { +{ system.autoUpgrade.enable = pkgs.lib.mkForce false; networking = { @@ -27,33 +25,6 @@ in { ]; }; - services.coredns = { - enable = true; - config = '' - . { - errors - log . { - class error - } - file ${zonefile} obx. - hosts { - 127.0.0.1 foo foo.local - fallthrough - } - cache 30 { - disable success cluster.local - disable denial cluster.local - } - header { - response set ra - } - forward . 8.8.8.8 8.8.4.4 - loop - reload - } - ''; - }; - boot = { loader.systemd-boot.enable = true; loader.efi.canTouchEfiVariables = true; @@ -151,6 +122,7 @@ in { imports = [ ./users.nix + ../dns.nix ../modules ../nixos ];