infra/modules/nixos/services/asterisk-phony/default.nix
Kaybee de10828177
All checks were successful
/ Check Nix Flake (push) Successful in 1m45s
Added First Wip Config of Asterisk
2025-05-26 23:27:26 +02:00

31 lines
783 B
Nix

{ inputs, config, lib, pkgs, ... }:
let
cfg = config.services.asterisk-phony;
in
{
imports = [
];
options.services.asterisk-phony = {
enable = lib.mkOption {
type = with lib.types; uniq bool;
default = false;
description = "Enable Asterisk Communication";
};
};
config = lib.mkIf cfg.enable {
services.asterisk = {
# See Configuration Options: https://search.nixos.org/options?channel=unstable&type=options&query=asterisk
enable = true;
confFiles = {
"pjsip.conf" = builtins.readFile ./pjsip.conf;
"extensions.conf" = builtins.readFile ./extensions.conf;
};
};
# Firewall
networking.firewall.allowedTCPPorts = [ 8088 8089 ];
# networking.firewall.allowedUDPPorts = [ ... ];
};
}