forked from malobeo/infrastructure
Merge branch 'dns'
This commit is contained in:
@@ -1,90 +1,107 @@
|
||||
{ ... }:
|
||||
|
||||
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 = hostId: mac: {
|
||||
local = false;
|
||||
hostId = hostId;
|
||||
address = "10.0.0.${hostId}";
|
||||
gateway = "10.0.0.1";
|
||||
nameservers = [ "1.1.1.1" ];
|
||||
mac = mac;
|
||||
};
|
||||
in
|
||||
{
|
||||
#TODO: fix local 192.168.1.0/24 addresses they are just palceholders!
|
||||
malobeo = {
|
||||
hosts = {
|
||||
louise = {
|
||||
type = "host";
|
||||
network = {
|
||||
local = true;
|
||||
hostId = "11";
|
||||
address = "192.168.1.101";
|
||||
};
|
||||
};
|
||||
|
||||
bakunin = {
|
||||
type = "host";
|
||||
network = {
|
||||
local = true;
|
||||
hostId = "12";
|
||||
address = "192.168.1.12";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
fanny = {
|
||||
type = "host";
|
||||
network = {
|
||||
local = true;
|
||||
hostId = "13";
|
||||
address = "192.168.1.13";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
lucia = {
|
||||
type = "rpi";
|
||||
network = {
|
||||
local = true;
|
||||
hostId = "15";
|
||||
address = "192.168.1.15";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
durruti = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.5";
|
||||
mac = "52:DA:0D:F9:EF:F9";
|
||||
};
|
||||
network = createMaloNet "5" "52:DA:0D:F9:EF:F9";
|
||||
};
|
||||
|
||||
|
||||
vpn = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.10";
|
||||
mac = "D0:E5:CA:F0:D7:E6";
|
||||
};
|
||||
network = createOffsiteNet "10" "52:DA:0D:F9:EF:E6";
|
||||
};
|
||||
|
||||
|
||||
infradocs = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.11";
|
||||
mac = "D0:E5:CA:F0:D7:E7";
|
||||
};
|
||||
network = createMaloNet "11" "52:DA:0D:F9:EF:E7";
|
||||
};
|
||||
|
||||
|
||||
uptimekuma = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.12";
|
||||
mac = "D0:E5:CA:F0:D7:E8";
|
||||
};
|
||||
network = createOffsiteNet "12" "52:DA:0D:F9:EF:E8";
|
||||
};
|
||||
|
||||
|
||||
nextcloud = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.13";
|
||||
mac = "D0:E5:CA:F0:D7:E9";
|
||||
};
|
||||
network = createMaloNet "13" "52:DA:0D:F9:EF:E9";
|
||||
};
|
||||
|
||||
|
||||
overwatch = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.14";
|
||||
mac = "D0:E5:CA:F0:D7:E0";
|
||||
};
|
||||
network = createMaloNet "14" "52:DA:0D:F9:EF:E0";
|
||||
};
|
||||
|
||||
|
||||
zineshop = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.15";
|
||||
mac = "D0:E5:CA:F0:D7:F1";
|
||||
};
|
||||
network = createMaloNet "15" "52:DA:0D:F9:EF:F1";
|
||||
};
|
||||
|
||||
vaultwarden = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.16";
|
||||
mac = "D0:E5:CA:F0:D7:F2";
|
||||
};
|
||||
network = createMaloNet "16" "D0:E5:CA:F0:D7:F2";
|
||||
};
|
||||
|
||||
testvm = {
|
||||
type = "host";
|
||||
ns1 = {
|
||||
type = "microvm";
|
||||
network = createMaloNet "17" "52:DA:0D:F9:EF:F3";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user