installed wyoming

This commit is contained in:
Leyla Becker 2025-07-13 17:22:46 -05:00
parent 0e8a148517
commit 2e8eba7709
3 changed files with 58 additions and 0 deletions

View file

@ -9,6 +9,7 @@
./forgejo.nix ./forgejo.nix
./searx.nix ./searx.nix
./home-assistant.nix ./home-assistant.nix
./wyoming.nix
./immich.nix ./immich.nix
./qbittorent.nix ./qbittorent.nix
]; ];

View file

@ -34,6 +34,9 @@ in {
jellyfin = { jellyfin = {
enable = lib.mkEnableOption "enable the jellyfin plugin"; enable = lib.mkEnableOption "enable the jellyfin plugin";
}; };
wyoming = {
enable = lib.mkEnableOption "enable wyoming";
};
}; };
}; };
@ -108,6 +111,10 @@ in {
services.home-assistant.extraComponents = ["jellyfin"]; services.home-assistant.extraComponents = ["jellyfin"];
# TODO: configure port, address, and login information here # TODO: configure port, address, and login information here
}) })
(lib.mkIf (config.services.home-assistant.extensions.wyoming.enable) {
services.home-assistant.extraComponents = ["wyoming"];
services.wyoming.enable = true;
})
(lib.mkIf (config.services.home-assistant.database == "postgres") { (lib.mkIf (config.services.home-assistant.database == "postgres") {
host = { host = {
postgres = { postgres = {

View file

@ -0,0 +1,50 @@
{
lib,
config,
...
}: {
options.services.wyoming.enable = lib.mkEnableOption "should wyoming be enabled on this device";
config = lib.mkIf config.services.wyoming.enable (lib.mkMerge [
{
services.wyoming.piper = {
servers = {
"en" = {
enable = true;
# see https://github.com/rhasspy/rhasspy3/blob/master/programs/tts/piper/script/download.py
voice = "en-us-amy-low";
uri = "tcp://0.0.0.0:10200";
speaker = 0;
};
};
};
services.wyoming.faster-whisper = {
servers = {
"en" = {
enable = true;
# see https://github.com/rhasspy/rhasspy3/blob/master/programs/asr/faster-whisper/script/download.py
model = "tiny-int8";
language = "en";
uri = "tcp://0.0.0.0:10300";
device = "cpu";
};
};
};
# needs access to /proc/cpuinfo
systemd.services."wyoming-faster-whisper-en".serviceConfig.ProcSubset = lib.mkForce "all";
}
(lib.mkIf config.host.impermanence.enable {
environment.persistence."/persist/system/root" = {
enable = true;
hideMounts = true;
directories = [
{
directory = "/var/lib/private/wyoming";
mode = "0700";
}
];
};
})
]);
}