mob next [ci-skip] [ci skip] [skip ci]

lastFile:modules/clan/phonebox/default.nix
This commit is contained in:
2025-12-18 15:47:08 +07:00
parent ec4c3897e2
commit 34e9774aa7
2 changed files with 17 additions and 0 deletions

View File

@@ -109,6 +109,12 @@
roles.default.machines."adhil".settings = {
ata-ethernet-iface = "end0";
};
roles.default.machines."rigel".settings = {
extraClientNumbers = [
"01"
"02"
];
};
};
pocket-id = {

View File

@@ -14,6 +14,11 @@
description = "An Ethernet interface that connect to ATA box.";
default = "enp2s0";
};
options.extraClientNumbers = lib.mkOption {
type = with lib.types; listOf str;
description = "List of client suffix number.";
default = [ ];
};
};
perInstance =
{
@@ -284,6 +289,9 @@
+ (genLocalExtenConf {
localNumber = config.clan.core.vars.generators.phonebox.files.ata-local-number.value;
})
+ lib.concatStringsSep "\n" (
builtins.map (number: genLocalExtenConf { localNumber = number; }) settings.extraClientNumbers
)
+ serverConf;
"rtp.conf" = ''
@@ -337,6 +345,9 @@
+ (genLocalSIPEndpoint {
localNumber = config.clan.core.vars.generators.phonebox.files.ata-local-number.value;
})
+ lib.concatStringsSep "\n" (
builtins.map (number: genLocalSIPEndpoint { localNumber = number; }) settings.extraClientNumbers
)
+ serverConf;
};
};