nixos-config/nixos/machines/pepe/tts.nix
Ingolf Wagner c0b60ac240
add tts
2023-02-05 06:21:10 +01:00

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";
};
};
}