Lower TTLs to 1h

This commit is contained in:
nora 2024-07-27 12:44:34 +02:00
parent 63163a38d0
commit ea74393dcd
3 changed files with 23 additions and 15 deletions

View file

@ -1,12 +1,16 @@
# https://github.com/nix-community/dns.nix
{ pkgs, ... }:
{ pkgs, lib, ... }:
let
data = with pkgs.nix-dns.lib.combinators;
let
dns1 = host "154.38.163.74" null;
dns2 = host "128.140.3.7" "2a01:4f8:c2c:d616::";
hour1 = 3600;
normalHost = ipv4: ipv6:
lib.optionalAttrs (ipv4 != null) { A = [ (ttl hour1 (a ipv4)) ]; } //
lib.optionalAttrs (ipv6 != null) { AAAA = [ (ttl hour1 (aaaa ipv6)) ]; };
dns1 = normalHost "154.38.163.74" null;
dns2 = normalHost "128.140.3.7" "2a01:4f8:c2c:d616::";
vps1 = host "161.97.165.1" null;
vps1 = normalHost "161.97.165.1" null;
in
# vps1 contains root noratrieb.dev
vps1 // {