fix: refactor dns server settings to toplevel
This commit is contained in:
27
dns.nix
Normal file
27
dns.nix
Normal file
@@ -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
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ ns2 IN A 100.64.0.28
|
|||||||
$ORIGIN svc.obx.
|
$ORIGIN svc.obx.
|
||||||
slurmctld IN A 127.0.0.1
|
slurmctld IN A 127.0.0.1
|
||||||
_slurmctld._tcp IN SRV 0 5 6817 slurmctld.svc.obx.
|
_slurmctld._tcp IN SRV 0 5 6817 slurmctld.svc.obx.
|
||||||
|
slurmdb IN A 10.255.241.15
|
||||||
|
|
||||||
$ORIGIN ceph.tos.obx.
|
$ORIGIN ceph.tos.obx.
|
||||||
ingress IN A 10.255.241.10
|
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
|
staging-rabbitmq IN A 10.255.241.13
|
||||||
rabbitmq IN A 10.255.241.14
|
rabbitmq IN A 10.255.241.14
|
||||||
prod-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-1 IN A 10.255.241.201
|
||||||
control-plane-2 IN A 10.255.241.202
|
control-plane-2 IN A 10.255.241.202
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
{
|
||||||
zonefile = builtins.toFile "obx.zone" (builtins.readFile ./obx.zone);
|
|
||||||
in {
|
|
||||||
system.autoUpgrade.enable = pkgs.lib.mkForce false;
|
system.autoUpgrade.enable = pkgs.lib.mkForce false;
|
||||||
|
|
||||||
networking = {
|
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 = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
loader.efi.canTouchEfiVariables = true;
|
loader.efi.canTouchEfiVariables = true;
|
||||||
@@ -151,6 +122,7 @@ in {
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./users.nix
|
./users.nix
|
||||||
|
../dns.nix
|
||||||
../modules
|
../modules
|
||||||
../nixos
|
../nixos
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user