test restructure

This commit is contained in:
2026-05-02 17:43:53 -05:00
parent 6fdc826b2a
commit 7302648b57
59 changed files with 3151 additions and 25 deletions
@@ -0,0 +1,57 @@
{ pkgs, config, lib, ... }:
let
service = "wyoming";
cfg = config.homelab.${service};
sec = config.sops.secrets;
homelab = config.homelab;
in
{
options.homelab.${service} = {
enable = lib.mkEnableOption "enables ${service}";
# set port options
faster_whisper_port = lib.mkOption {
type = lib.types.str;
default = "7706";
description = "set port for ${service} (default: ${toString cfg.port}";
};
piper_port = lib.mkOption {
type = lib.types.str;
default = "7707";
description = "set port for ${service} (default: ${toString cfg.port}";
};
};
config = lib.mkIf cfg.enable {
# enable the ${service} service
services.${service} = {
faster-whisper = {
servers = {
vanessa = {
enable = true;
language = "en";
uri = "tcp://0.0.0.0:${cfg.faster_whisper_port}";
model = "medium";
device = "auto";
};
};
};
piper = {
servers = {
vanessa = {
enable = true;
uri = "tcp://0.0.0.0:${cfg.piper_port}";
voice = "en_US-amy-medium";
};
};
};
};
# # open firewall
#networking.firewall.allowedTCPPorts = [ cfg.faster_whisper_port cfg.piper_port ];
networking.firewall.allowedTCPPorts = [ 7706 7707 ];
};
}