photoncloud-monorepo/nix-nos/examples/datacenter-node.nix
centra 3eeb303dcb feat: Batch commit for T039.S3 deployment
Includes all pending changes needed for nixos-anywhere:
- fiberlb: L7 policy, rule, certificate types
- deployer: New service for cluster management
- nix-nos: Generic network modules
- Various service updates and fixes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 04:34:51 +09:00

55 lines
1.2 KiB
Nix

# 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" ];
};
};
}