Files
cnx-network-clan/machines/ns2/configuration.nix
T
Berwn 158252323f Add site gateway role (modules/router) and gw-cnx-1
Reusable cnx.router.* module for the Topton 1U boxes replacing OPNsense:
PPPoE WAN (optionally VLAN-tagged, AIS: 10, secret credentials incl.
username), VLAN-filtering bridge, nftables NAT/firewall with MSS clamp,
Kea DHCP with per-VLAN lease time, Blocky DNS, DHCPv6-PD, CrowdSec with
the ZeroTier mesh whitelisted, optional Omada controller, ZFS disk.

Fleet baseline rides along: admins sops group is now derived for every
machine in clan.nix (secrets encrypt to it from the first vars generate)
and time sync is chrony everywhere instead of systemd-timesyncd.
2026-07-28 17:06:07 +07:00

30 lines
760 B
Nix

{ config, ... }:
let
domains = import ../../modules/dns/domains.nix;
hosts = import ../../modules/hosts.nix;
in
{
imports = [
../../modules/dns/authoritative.nix
../../modules/static-ipv6.nix
../../modules/monitoring/exporters.nix
];
# Public IPv6 (from modules/hosts.nix; matches the ns2 AAAA glue); SLAAC
# doesn't bring it up here.
cnx.staticIPv6 = {
enable = true;
address = hosts.${config.networking.hostName}.ipv6;
};
time.timeZone = "Etc/GMT-3"; # UTC+3 (fixed offset, no DST)
services.chrony.enable = true;
# ns2 = secondary (slave): pulls every zone from ns1 and accepts its NOTIFY.
services.knot.settings.zone = map (d: {
domain = d;
master = [ "ns1" ];
acl = [ "acl_ns1" ];
}) domains;
}