From d9bf5d0a708be5ad53ea01595136da9b659eaa3d Mon Sep 17 00:00:00 2001 From: kurogeek Date: Wed, 29 Oct 2025 15:09:58 +0700 Subject: [PATCH] mob next [ci-skip] [ci skip] [skip ci] lastFile:modules/clan/phonebox/default.nix --- modules/clan/phonebox/default.nix | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/modules/clan/phonebox/default.nix b/modules/clan/phonebox/default.nix index 2143d7c..1745371 100644 --- a/modules/clan/phonebox/default.nix +++ b/modules/clan/phonebox/default.nix @@ -13,6 +13,7 @@ ... }: let + user = "asterisk"; ata-interface = ""; rtpPortFrom = 10000; rtpPortTo = 20000; @@ -63,9 +64,25 @@ files = { server-prefix-number.secret = false; ata-local-number.secret = false; - ata-password.secret = true; + ata-password = { + owner = user; + group = user; + secret = true; + }; }; - script = ''''; + script = '' + + ''; + }; + + systemd.services.asterisk.serviceConfig = { + LoadCredential = [ + "sip_password_filepath:${config.clan.core.vars.generators.phonebox.files.ata-password.path}" + ]; + + Environment = [ + "SIP_PASSWORD=%d/sip_password_filepath" + ]; }; networking.interfaces = {