From 26fc825cd2775c1f817347daec06949f5e6b0d4d Mon Sep 17 00:00:00 2001 From: kurogeek Date: Fri, 24 Oct 2025 16:51:55 +0700 Subject: [PATCH] mob next [ci-skip] [ci skip] [skip ci] lastFile:modules/clan/phonebox/default.nix --- modules/clan/phonebox/default.nix | 61 ++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/modules/clan/phonebox/default.nix b/modules/clan/phonebox/default.nix index b4e7b89..f9c9597 100644 --- a/modules/clan/phonebox/default.nix +++ b/modules/clan/phonebox/default.nix @@ -12,7 +12,66 @@ ... }: { - networking.firewall.allowedUDPPorts = [ 5060 ]; + networking.interfaces = { + ${ata-interface} = { + useDHCP = false; + ipv4.addresses = [ + { + address = "192.168.254.1"; + prefixLength = 24; + } + ]; + }; + }; + + services.dnsmasq = { + enable = true; + + settings = { + bind-interfaces = true; + # enable-ra = true; + domain-needed = true; + domain = "localhost"; + dhcp-range = [ + "192.168.254.100,192.168.254.100,255.255.255.0,24h" + ]; + dhcp-option = [ + "3,192.168.254.1" + "option6:information-refresh-time,3600" + ]; + interface = [ ata-interface ]; + }; + }; + + services.nginx = { + enable = true; + virtualHosts = { + "_" = { + locations."/" = { + proxyPass = "http://192.168.254.100"; + }; + }; + }; + }; + + networking.firewall.allowedUDPPortRanges = [ + { + from = 10000; + to = 20000; + } + ]; + + networking.firewall.allowedUDPPorts = [ + 53 + 67 + 5060 + ]; + networking.firewall.allowedTCPPorts = [ + 53 + 80 + 443 + ]; + services.asterisk = { enable = lib.mkDefault true; confFiles = {