configuration
flake
hosts
_iso
aluminium
astatine
backup-4
beryllium
carbon
configuration.nix
dns.nix
hardware-configuration.nix
mdns.nix
net-dsl.nix
net-gastnetz.nix
net-heimnetz.nix
net-iot.nix
net-lte.nix
net-mgmt.nix
net-printer.nix
net-voip.nix
ntp.nix
ppp.nix
scan-to-gpg.nix
secrets.json
ssh.pub
wg-clerie.nix
clerie-backup
dn42-il-gw1
dn42-il-gw5
dn42-il-gw6
dn42-ildix-clerie
dn42-ildix-service
gatekeeper
hydra-1
hydra-2
krypton
mail-2
monitoring-3
nonat
osmium
palladium
porter
storage-2
tungsten
web-2
zinc
lib
modules
pkgs
profiles
users
.gitignore
README.md
flake.lock
flake.nix
106 lines
2.2 KiB
Nix
106 lines
2.2 KiB
Nix
{ ... }:
|
|
|
|
{
|
|
|
|
## VoIP
|
|
networking.vlans."enp1s0.204" = {
|
|
id = 204;
|
|
interface = "enp1s0";
|
|
};
|
|
networking.interfaces."enp1s0.204".ipv4.addresses = [
|
|
{ address = "10.152.33.1"; prefixLength = 24; }
|
|
];
|
|
|
|
services.kea.dhcp4 = {
|
|
settings = {
|
|
interfaces-config = {
|
|
interfaces = [ "enp1s0.204" ];
|
|
};
|
|
option-def = [
|
|
{
|
|
space = "dhcp4";
|
|
name = "vendor-encapsulated-options";
|
|
code = 43;
|
|
type = "empty";
|
|
encapsulate = "sipdect";
|
|
}
|
|
{
|
|
space = "sipdect";
|
|
name = "ommip1";
|
|
code = 10;
|
|
type = "ipv4-address";
|
|
}
|
|
{
|
|
space = "sipdect";
|
|
name = "ommip2";
|
|
code = 19;
|
|
type = "ipv4-address";
|
|
}
|
|
{
|
|
space = "sipdect";
|
|
name = "syslogip";
|
|
code = 14;
|
|
type = "ipv4-address";
|
|
}
|
|
{
|
|
space = "sipdect";
|
|
name = "syslogport";
|
|
code = 15;
|
|
type = "int16";
|
|
}
|
|
{
|
|
space = "dhcp4";
|
|
name = "magic_str";
|
|
code = 224;
|
|
type = "string";
|
|
}
|
|
];
|
|
subnet4 = [
|
|
# VoIP
|
|
{
|
|
id = 204;
|
|
subnet = "10.152.33.0/24";
|
|
pools = [
|
|
{
|
|
pool = "10.152.33.10 - 10.152.33.200";
|
|
}
|
|
];
|
|
option-data = [
|
|
{
|
|
name = "routers";
|
|
data = "10.152.33.1";
|
|
}
|
|
];
|
|
|
|
reservations = [
|
|
{
|
|
hostname = "iridium";
|
|
hw-address = "00:30:42:1B:8C:7C";
|
|
ip-address = "10.152.33.11";
|
|
option-data = [
|
|
{
|
|
name = "host-name";
|
|
data = "iridium";
|
|
}
|
|
{
|
|
name = "vendor-encapsulated-options";
|
|
}
|
|
{
|
|
space = "sipdect";
|
|
name = "ommip1";
|
|
data = "10.152.33.11";
|
|
}
|
|
{
|
|
name = "magic_str";
|
|
data = "OpenMobilitySIP-DECT";
|
|
}
|
|
];
|
|
}
|
|
];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
}
|