forked from malobeo/infrastructure
114 lines
2.3 KiB
Nix
114 lines
2.3 KiB
Nix
{ ... }:
|
|
|
|
let
|
|
createMaloNet = hostId: mac: {
|
|
local = true;
|
|
hostId = hostId;
|
|
address = "192.168.1.${hostId}";
|
|
gateway = "192.168.1.1";
|
|
nameservers = [ "192.168.1.1" "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.102";
|
|
};
|
|
};
|
|
|
|
fanny = {
|
|
type = "host";
|
|
network = {
|
|
local = true;
|
|
hostId = "13";
|
|
address = "192.168.1.103";
|
|
};
|
|
};
|
|
|
|
lucia = {
|
|
type = "rpi";
|
|
network = {
|
|
local = true;
|
|
hostId = "15";
|
|
address = "192.168.1.105";
|
|
};
|
|
};
|
|
|
|
durruti = {
|
|
type = "microvm";
|
|
network = createMaloNet "5" "52:DA:0D:F9:EF:F9";
|
|
};
|
|
|
|
vpn = {
|
|
type = "microvm";
|
|
network = createOffsiteNet "10" "52:DA:0D:F9:EF:E6";
|
|
};
|
|
|
|
infradocs = {
|
|
type = "microvm";
|
|
network = createMaloNet "11" "52:DA:0D:F9:EF:E7";
|
|
};
|
|
|
|
uptimekuma = {
|
|
type = "microvm";
|
|
network = createOffsiteNet "12" "52:DA:0D:F9:EF:E8";
|
|
};
|
|
|
|
nextcloud = {
|
|
type = "microvm";
|
|
network = createMaloNet "13" "52:DA:0D:F9:EF:E9";
|
|
};
|
|
|
|
overwatch = {
|
|
type = "microvm";
|
|
network = createMaloNet "14" "52:DA:0D:F9:EF:E0";
|
|
};
|
|
|
|
zineshop = {
|
|
type = "microvm";
|
|
network = createMaloNet "15" "52:DA:0D:F9:EF:F1";
|
|
};
|
|
|
|
vaultwarden = {
|
|
type = "microvm";
|
|
network = createMaloNet "16" "D0:E5:CA:F0:D7:F2";
|
|
};
|
|
|
|
ns1 = {
|
|
type = "microvm";
|
|
network = createMaloNet "17" "52:DA:0D:F9:EF:F3";
|
|
};
|
|
|
|
pretalx = {
|
|
type = "microvm";
|
|
network = createMaloNet "18" "52:DA:0D:F9:EF:F4";
|
|
};
|
|
};
|
|
};
|
|
}
|