deployment: added dns

This commit is contained in:
Johannes Lötzsch 2022-03-10 09:50:38 +01:00
parent fcc22aaf7d
commit f19516a7a4
3 changed files with 62 additions and 1 deletions

View File

@ -0,0 +1,23 @@
{config, pkgs, nixpkgs, system, dns, ...}:
let
util = dns.util.${system};
in
{
networking.domain = "beherbergung.mission-lifeline.de";
services.bind = {
enable = true;
zones = {
"${config.networking.domain}" = {
master = true;
file = util.writeZone "${config.networking.domain}" (import (./dns + "/${config.networking.domain}.nix") {inherit dns;});
};
"beherbergung.broenradio.org" = { ## not required in future (but till the NS-record of beherbergung.mission-lifeline.de is configured)
master = true;
file = util.writeZone "beherbergung.broenradio.org" (import (./dns + "/${config.networking.domain}.nix") {inherit dns;});
};
};
};
networking.firewall.allowedTCPPorts = [ 53 ];
networking.firewall.allowedUDPPorts = [ 53 ];
}

View File

@ -0,0 +1,38 @@
{ dns, ... }:
with dns.lib.combinators; {
SOA = {
nameServer = #"ns1";
"ns1.broenradio.org.";
adminEmail = "dns-admin@mission-lifeline.de";
serial = 2022031001;
};
NS = [
#"ns1"
#"ns2"
"ns1.broenradio.org."
"ns2.broenradio.org."
];
A = [ "88.198.203.104" ];
AAAA = [ "2a01:4f8:c0c:cf13::1" ];
subdomains = rec {
server1 = host "88.198.203.104" "2a01:4f8:c0c:cf13::1";
ns1 = server1;
ns2 = server1; ## TODO
backend = server1;
search = server1;
submission = server1;
binarycache = server1;
grafana = server1;
prometheus-server1 = server1;
loki-server1 = server1;
};
}

View File

@ -33,7 +33,7 @@
./deployment/modules/default.nix
#sops-nix.nixosModules.sops
#./deployment/modules/sops.nix
#./deployment/modules/dns.nix
./deployment/modules/dns.nix
#./deployment/modules/monitoring/client.nix
#./deployment/modules/nginx/timmi.nix
#nix-deploy-git.nixosModule