# Data center node configuration # Demonstrates BGP routing and VLAN segmentation { config, pkgs, ... }: { imports = [ ../modules ]; # Enable Nix-NOS nix-nos.enable = true; # Primary interface nix-nos.interfaces.eth0 = { addresses = [ "10.0.0.10/24" ]; gateway = "10.0.0.1"; dns = [ "8.8.8.8" "8.8.4.4" ]; }; # BGP configuration for dynamic routing nix-nos.bgp = { enable = true; backend = "bird"; asn = 65000; routerId = "10.0.0.10"; # Peer with upstream routers peers = [ { address = "10.0.0.1"; asn = 65001; description = "ToR switch"; } { address = "10.0.0.2"; asn = 65001; description = "ToR switch backup"; } ]; # Announce local prefixes announcements = [ { prefix = "203.0.113.10/32"; } ]; }; # VLAN segmentation for storage and management nix-nos.vlans = { storage = { id = 100; interface = "eth0"; addresses = [ "10.100.0.10/24" ]; mtu = 9000; # Jumbo frames for storage traffic }; mgmt = { id = 200; interface = "eth0"; addresses = [ "10.200.0.10/24" ]; gateway = "10.200.0.1"; dns = [ "10.200.0.53" ]; }; }; }