Files
infrastructure/machines/hosts.nix

98 lines
2.0 KiB
Nix

{ ... }:
let
createMaloNet = hostId: mac: {
local = true;
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: {
local = false;
address = address;
gateway = "10.0.10.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;
address = "192.168.1.11";
};
};
bakunin = {
type = "host";
network = {
local = true;
address = "192.168.1.12";
};
};
fanny = {
type = "host";
network = {
local = true;
address = "192.168.1.13";
};
};
lucia = {
type = "rpi";
network = {
local = true;
address = "192.168.1.15";
};
};
durruti = {
type = "microvm";
network = createMaloNet "5" "52:DA:0D:F9:EF:F9";
};
vpn = {
type = "microvm";
network = createOffsiteNet "10.0.0.10" "52:DA:0D:F9:EF:E6";
};
infradocs = {
type = "microvm";
network = createMaloNet "11" "52:DA:0D:F9:EF:E7";
};
uptimekuma = {
type = "microvm";
network = createOffsiteNet "10.0.0.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";
};
ns1 = {
type = "microvm";
network = createMaloNet "17" "52:DA:0D:F9:EF:F3";
};
};
};
}