Files
infrastructure/machines/hosts.nix

104 lines
2.1 KiB
Nix

{ ... }:
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.11";
};
};
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 = 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";
};
ns1 = {
type = "microvm";
network = createMaloNet "17" "52:DA:0D:F9:EF:F3";
};
};
};
}