mob next [ci-skip] [ci skip] [skip ci]
lastFile:clan.nix
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
inputs,
|
||||
self,
|
||||
libNet,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@@ -70,7 +71,7 @@ in
|
||||
genVlan = id: length: rec {
|
||||
inherit id;
|
||||
prefixLength = length;
|
||||
subnet = libNet.net.cidr.make length "10.0.${id}.0";
|
||||
subnet = libNet.net.cidr.make length "10.0.${lib.toString id}.0";
|
||||
address = libNet.net.cidr.host 1 subnet;
|
||||
dhcp.pool.from = libNet.net.cidr.host 100 subnet;
|
||||
dhcp.pool.to = libNet.net.cidr.host 200 subnet;
|
||||
@@ -83,7 +84,7 @@ in
|
||||
vlanId = null;
|
||||
};
|
||||
vlans = {
|
||||
mgmt = genVlan 10 24 // {
|
||||
mgmt = lib.recursiveUpdate (genVlan 10 24) {
|
||||
dhcp.fixedIPs.storinator01 = {
|
||||
hwAddress = "7c:c2:55:e0:d6:40";
|
||||
ipAddress = "10.1.10.53";
|
||||
@@ -97,7 +98,7 @@ in
|
||||
unit2 = genVlan 120 24;
|
||||
unit3 = genVlan 130 24;
|
||||
unit4 = genVlan 140 24;
|
||||
unit5 = genVlan 150 24 // {
|
||||
unit5 = lib.recursiveUpdate (genVlan 150 24) {
|
||||
dhcp.fixedIPs.newt = {
|
||||
hwAddress = "7c:d3:0a:21:58:0b";
|
||||
ipAddress = "10.1.150.22";
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
vlanIf = name: "vlan=${name}";
|
||||
vlanIf = name: "vlan-${name}";
|
||||
in
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user