From 199e1fe5635a8d4e0d4ee074f638697593382ce1 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 24 Aug 2023 14:25:59 +0200 Subject: [PATCH] reconfigure tts --- nixos/components/gui/default.nix | 1 + nixos/components/gui/vscode.nix | 26 +++++++++++++++++++++++ nixos/components/network/tinc/private.nix | 2 ++ nixos/machines/chungus/tts.nix | 26 +++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 nixos/components/gui/vscode.nix diff --git a/nixos/components/gui/default.nix b/nixos/components/gui/default.nix index d63d492..d9e273a 100644 --- a/nixos/components/gui/default.nix +++ b/nixos/components/gui/default.nix @@ -17,6 +17,7 @@ with lib; ./taskwarrior.nix ./style.nix ./noti.nix + ./vscode.nix ]; config = mkIf config.components.gui.enable { diff --git a/nixos/components/gui/vscode.nix b/nixos/components/gui/vscode.nix new file mode 100644 index 0000000..17e6b28 --- /dev/null +++ b/nixos/components/gui/vscode.nix @@ -0,0 +1,26 @@ +{ config, pkgs, lib, ... }: +with lib; +{ + options.components.gui.vscode.enable = mkOption { + type = lib.types.bool; + default = config.components.gui.enable; + }; + + config = mkIf (config.components.gui.vscode.enable) { + environment.systemPackages = with pkgs; [ + (vscode-with-extensions.override { + vscodeExtensions = with vscode-extensions; [ + bbenoist.nix + ms-python.python + ms-azuretools.vscode-docker + ms-vscode-remote.remote-ssh + vscodevim.vim + rust-lang.rust-analyzer + #github.copilot-labs + github.copilot + #github.copilot-chat + ]; + }) + ]; + }; +} diff --git a/nixos/components/network/tinc/private.nix b/nixos/components/network/tinc/private.nix index dd4aa3d..f3b8b96 100644 --- a/nixos/components/network/tinc/private.nix +++ b/nixos/components/network/tinc/private.nix @@ -40,6 +40,8 @@ let "tdarr.chungus" = hosts.chungus; "trilium.chungus" = hosts.chungus; "tts.chungus" = hosts.chungus; + "de.tts.chungus" = hosts.chungus; + "en.tts.chungus" = hosts.chungus; # cream "trilium.cream" = hosts.cream; }; diff --git a/nixos/machines/chungus/tts.nix b/nixos/machines/chungus/tts.nix index 0a6c946..ecfcd12 100644 --- a/nixos/machines/chungus/tts.nix +++ b/nixos/machines/chungus/tts.nix @@ -19,11 +19,37 @@ }; }; + services.tts = { + servers = { + english = { + enable = true; + port = 5300; + #model = "tts_models/en/ljspeech/tacotron2-DDC"; + model = "tts_models/en/ljspeech/vits"; + }; + german = { + enable = true; + port = 5301; + #model = "tts_models/de/thorsten/tacotron2-DDC"; + model = "tts_models/de/thorsten/vits"; + }; + }; + }; + services.nginx = { recommendedProxySettings = true; enable = true; + # works virtualHosts."tts.${config.networking.hostName}.private" = { locations."/".proxyPass = "http://localhost:5004"; }; + # works not + virtualHosts."en.tts.${config.networking.hostName}.private" = { + locations."/".proxyPass = "http://localhost:${toString config.services.tts.servers.english.port}"; + }; + # works + virtualHosts."de.tts.${config.networking.hostName}.private" = { + locations."/".proxyPass = "http://localhost:${toString config.services.tts.servers.german.port}"; + }; }; }