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