[hosts] use hostId in offsite net
All checks were successful
Check flake syntax / flake-check (push) Successful in 5m29s

This commit is contained in:
2026-01-30 20:26:12 +01:00
parent f0e1f07c3e
commit 0347fa68c7

View File

@@ -3,16 +3,18 @@
let
createMaloNet = hostId: mac: {
local = true;
hostId = hostId;
address = "192.168.1.${hostId}";
gateway = "192.168.1.1";
nameservers = [ "192.168.1.17" "1.1.1.1" ]; #setting ns1 as nameserver
mac = mac;
};
createOffsiteNet = address: mac: {
createOffsiteNet = hostId: mac: {
local = false;
address = address;
gateway = "10.0.10.1";
hostId = hostId;
address = "10.0.0.${hostId}";
gateway = "10.0.0.1";
nameservers = [ "1.1.1.1" ];
mac = mac;
};
@@ -25,6 +27,7 @@ in
type = "host";
network = {
local = true;
hostId = "11";
address = "192.168.1.11";
};
};
@@ -33,6 +36,7 @@ in
type = "host";
network = {
local = true;
hostId = "12";
address = "192.168.1.12";
};
};
@@ -41,6 +45,7 @@ in
type = "host";
network = {
local = true;
hostId = "13";
address = "192.168.1.13";
};
};
@@ -49,6 +54,7 @@ in
type = "rpi";
network = {
local = true;
hostId = "15";
address = "192.168.1.15";
};
};
@@ -60,7 +66,7 @@ in
vpn = {
type = "microvm";
network = createOffsiteNet "10.0.0.10" "52:DA:0D:F9:EF:E6";
network = createOffsiteNet "10" "52:DA:0D:F9:EF:E6";
};
infradocs = {
@@ -70,7 +76,7 @@ in
uptimekuma = {
type = "microvm";
network = createOffsiteNet "10.0.0.12" "52:DA:0D:F9:EF:E8";
network = createOffsiteNet "12" "52:DA:0D:F9:EF:E8";
};
nextcloud = {