28 lines
634 B
Nix
28 lines
634 B
Nix
{ pkgs
|
|
, config
|
|
, ...
|
|
}: {
|
|
systemd.services.tts = {
|
|
after = [ "network.target" ];
|
|
wantedBy = [ "multi-user.target" ];
|
|
path = [ pkgs.espeak ];
|
|
environment.HOME = "/var/lib/tts";
|
|
serviceConfig = {
|
|
StateDirectory = "tts";
|
|
DynamicUser = true;
|
|
User = "tts";
|
|
Group = "tts";
|
|
ExecStart = ''
|
|
${pkgs.tts}/bin/tts-server --model_name tts_models/en/ljspeech/vits --port 5004
|
|
'';
|
|
};
|
|
};
|
|
|
|
services.nginx = {
|
|
recommendedProxySettings = true;
|
|
enable = true;
|
|
virtualHosts."tts.pepe.private" = {
|
|
locations."/".proxyPass = "http://localhost:5004";
|
|
};
|
|
};
|
|
}
|