Netconf-Module/configMaker.nix

110 lines
1.9 KiB
Nix
Raw Normal View History

2024-03-05 21:10:00 +01:00
let module_inst = {
2024-04-04 16:34:14 +02:00
interfaces = let
AP = { # AP
enable = true;
interface-mode = "trunk";
vlans = [ "users" "admin" ];
};
off.enable = false;
in {
"ge-0/0/12" = AP;
"ge-0/0/13" = AP;
"ge-0/0/14" = AP;
"ge-0/0/15" = AP;
"ge-0/0/16" = AP;
"ge-0/0/17" = AP;
2024-03-21 22:04:13 +01:00
2024-04-04 16:34:14 +02:00
"ge-0/1/1" = {
enable = true;
interface-mode = "trunk";
vlans = [ "uplink-cri" ];
2024-03-05 21:10:00 +01:00
};
2024-03-07 17:34:27 +01:00
2024-04-04 16:34:14 +02:00
"xe-0/1/0" = { # upstream
enable = true;
interface-mode = "trunk";
vlans = [ "all" ];
dhcp_trusted = true;
};
2024-03-05 21:10:00 +01:00
2024-04-04 16:34:14 +02:00
"me0" = { # mgmt
enable = true;
2024-04-04 18:17:36 +02:00
management = "192.168.42.6/24";
2024-03-05 21:10:00 +01:00
};
};
2024-04-04 16:34:14 +02:00
vlans = {
2024-04-05 15:50:41 +02:00
"users".ids = [ { begin = 3045; end = 4094; } ];
"admin" = {
ids = 3000;
2024-04-05 15:50:41 +02:00
management = "10.0.0.2/22";
};
"uplink-cri".ids = [ 223 ];
2024-04-04 16:34:14 +02:00
};
2024-03-07 17:34:27 +01:00
};
2024-04-04 16:34:14 +02:00
module = import ./moduleMaker.nix [
"ge-0/0/0"
"ge-0/0/1"
"ge-0/0/2"
"ge-0/0/3"
"ge-0/0/4"
"ge-0/0/5"
"ge-0/0/6"
"ge-0/0/7"
"ge-0/0/8"
"ge-0/0/9"
"ge-0/0/10"
"ge-0/0/11"
"ge-0/0/12"
"ge-0/0/13"
"ge-0/0/14"
"ge-0/0/15"
"ge-0/0/16"
"ge-0/0/17"
"ge-0/0/18"
"ge-0/0/19"
"ge-0/0/20"
"ge-0/0/21"
"ge-0/0/22"
"ge-0/0/23"
"ge-0/0/24"
"ge-0/0/25"
"ge-0/0/26"
"ge-0/0/27"
"ge-0/0/28"
"ge-0/0/29"
"ge-0/0/30"
"ge-0/0/31"
"ge-0/0/32"
"ge-0/0/33"
"ge-0/0/34"
"ge-0/0/35"
"ge-0/0/36"
"ge-0/0/37"
"ge-0/0/38"
"ge-0/0/39"
"ge-0/0/40"
"ge-0/0/41"
"ge-0/0/42"
"ge-0/0/43"
"ge-0/0/44"
"ge-0/0/45"
"ge-0/0/46"
"ge-0/0/47"
"ge-0/1/0"
"ge-0/1/1"
"ge-0/1/2"
"ge-0/1/3"
"xe-0/1/0"
"xe-0/1/1"
"xe-0/1/2"
"xe-0/1/3"
"me0"
];
2024-03-05 21:10:00 +01:00
in (import <nixpkgs/lib>).evalModules {
modules = [ module module_inst ];
}