2022-07-07 19:46:59 +02:00
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Use the GRUB 2 boot loader.
|
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
|
boot.loader.grub.version = 2;
|
|
|
|
|
boot.loader.grub.device = "/dev/sda";
|
|
|
|
|
|
|
|
|
|
networking.hostName = "pre-yate-n0emis";
|
|
|
|
|
|
2022-07-10 14:19:42 +02:00
|
|
|
|
boot.kernel.sysctl = {
|
|
|
|
|
"net.ipv4.conf.all.forwarding" = true;
|
|
|
|
|
"net.ipv6.conf.all.forwarding" = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-07-07 19:46:59 +02:00
|
|
|
|
networking.useNetworkd = true;
|
|
|
|
|
systemd.network = {
|
|
|
|
|
links."10-eth0" = {
|
|
|
|
|
matchConfig.MACAddress = "4a:a6:0d:b9:3b:82";
|
|
|
|
|
linkConfig.Name = "eth0";
|
|
|
|
|
};
|
|
|
|
|
networks."10-eth0" = {
|
|
|
|
|
matchConfig = {
|
|
|
|
|
Name = "eth0";
|
|
|
|
|
};
|
|
|
|
|
DHCP = "yes";
|
|
|
|
|
};
|
2022-07-10 14:19:42 +02:00
|
|
|
|
|
|
|
|
|
links."20-vlan132" = {
|
|
|
|
|
matchConfig.MACAddress = "8e:50:2d:73:27:51";
|
|
|
|
|
linkConfig.Name = "vlan132";
|
|
|
|
|
};
|
|
|
|
|
networks."20-vlan132" = {
|
|
|
|
|
matchConfig = {
|
|
|
|
|
Name = "vlan132";
|
|
|
|
|
};
|
|
|
|
|
address = [ "10.42.132.1/24" ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.fieldpoc = {
|
|
|
|
|
enable = true;
|
|
|
|
|
dhcp = {
|
|
|
|
|
enable = true;
|
|
|
|
|
interface = "vlan132";
|
|
|
|
|
subnet = "10.42.132.0/24";
|
|
|
|
|
pool = "10.42.132.200 - 10.42.132.250";
|
|
|
|
|
router = "10.42.132.1";
|
|
|
|
|
dnsServers = "1.1.1.1,9.9.9.9";
|
|
|
|
|
omm = "10.42.132.11";
|
|
|
|
|
reservations = [
|
|
|
|
|
{
|
|
|
|
|
name = "rfp-01";
|
|
|
|
|
macAddress = "00:30:42:1B:8C:7A";
|
|
|
|
|
ipAddress = "10.42.132.11";
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
services.yate.config = {
|
|
|
|
|
yate.ygi = {
|
|
|
|
|
sndpath = "/opt/sounds";
|
|
|
|
|
sndformats = "slin,gsm,wav";
|
|
|
|
|
};
|
|
|
|
|
accfile.dialout = {
|
|
|
|
|
enabled = "yes";
|
|
|
|
|
protocol = "sip";
|
|
|
|
|
username = "iocaste";
|
|
|
|
|
password = "iocaste";
|
|
|
|
|
registrar = "172.16.1.1";
|
|
|
|
|
};
|
|
|
|
|
regexroute = "[default]
|
|
|
|
|
\${username}^$=-;error=noauth
|
|
|
|
|
^iocaste$=goto dialin
|
|
|
|
|
^99991001$=tone/dial
|
|
|
|
|
^99991002$=tone/busy
|
|
|
|
|
^99991003$=tone/ring
|
|
|
|
|
^99991004$=tone/specdial
|
|
|
|
|
^99991005$=tone/congestion
|
|
|
|
|
^99991006$=tone/outoforder
|
|
|
|
|
^99991007$=tone/milliwatt
|
|
|
|
|
^99991008$=tone/info
|
|
|
|
|
^.*$=line/\\0;line=dialout
|
|
|
|
|
|
|
|
|
|
[dialin]
|
|
|
|
|
\${sip_x-called}^.*$=lateroute/\\1";
|
2022-07-07 19:46:59 +02:00
|
|
|
|
};
|
|
|
|
|
|
2022-07-07 21:41:55 +02:00
|
|
|
|
|
2022-07-07 19:46:59 +02:00
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "22.05"; # Did you read the comment?
|
|
|
|
|
|
|
|
|
|
}
|