Files
cnx-network-clan/machines/gw-cnx-1/configuration.nix
T
kurogeek c9b04711c9 router: stagingPort option, move gw-cnx-1 staging uplink into it
The pre-cutover DHCP-client uplink into the old LAN was a hand-written
systemd.network block in the gw-cnx-1 machine config. Make it a router
setting next to trunkPorts/accessPorts so every replacement gateway can
stage the same way, with an assertion that the port is not also the WAN,
a trunk or an access port. gw-cnx-1 sets stagingPort = "enp3s0" in the
inventory; the machine-local block is gone.
2026-09-16 08:30:14 +00:00

22 lines
837 B
Nix

# Site gateway Chiang Mai (site 1): Topton 1U, Intel N300, 4x i226-V 2.5G.
# The router itself (ports, VLANs, features) is the `router` service instance
# in clan.nix; only machine-local bits live here.
{ config, lib, ... }:
{
imports = [ ../../modules/monitoring/exporters.nix ];
clan.core.sops.defaultGroups = [ "admins" ];
# Until the install generates facter.json (which normally provides this).
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
# ZFS (disko.nix) needs a stable machine-unique hostId; derive it from the
# hostname so every gateway gets one for free when copied for a new site.
networking.hostId = builtins.substring 0 8 (
builtins.hashString "sha256" config.networking.hostName
);
time.timeZone = "Etc/GMT-7"; # UTC+7 (Thailand, fixed offset, no DST)
services.chrony.enable = true;
}