From 01a0f561b73ad51bb6eb0dc32f9c79f26f1a1659 Mon Sep 17 00:00:00 2001 From: Nathan Date: Thu, 31 Jul 2025 08:49:33 -0500 Subject: [PATCH] discrete options --- .../configuration/homebox/default.nix | 7 ++++- .../services/containers/wyoming/default.nix | 26 ++++++++++++++----- system-config/services/wyoming/default.nix | 24 ++++++++++++----- 3 files changed, 43 insertions(+), 14 deletions(-) diff --git a/system-config/configuration/homebox/default.nix b/system-config/configuration/homebox/default.nix index 4bef067..ffbe917 100644 --- a/system-config/configuration/homebox/default.nix +++ b/system-config/configuration/homebox/default.nix @@ -265,7 +265,12 @@ netbird.enable = true; ollama.enable = true; homeassistant.enable = true; - wyoming.enable = true; + wyoming = { + enable = true; + piper = true; + openwakeword = true; + faster-whisper = true; + }; rustdesk.enable = false; #broken pihole.enable = false; #broken }; diff --git a/system-config/services/containers/wyoming/default.nix b/system-config/services/containers/wyoming/default.nix index 59e3fb1..6e8c85f 100644 --- a/system-config/services/containers/wyoming/default.nix +++ b/system-config/services/containers/wyoming/default.nix @@ -5,7 +5,19 @@ type = lib.types.bool; default = false; }; - satelliteOnly = lib.options.mkOption { + piper = lib.options.mkOption { + type = lib.types.bool; + default = false; + }; + openwakeword = lib.options.mkOption { + type = lib.types.bool; + default = false; + }; + faster-whisper = lib.options.mkOption { + type = lib.types.bool; + default = false; + }; + satellite = lib.options.mkOption { type = lib.types.bool; default = false; }; @@ -13,7 +25,7 @@ config = lib.mkIf config.sysconfig.opts.virtualization.wyoming.enable { - containers.n8n = { + containers.wyoming = { autoStart = true; privateNetwork = true; @@ -74,16 +86,16 @@ services.wyoming = { - piper = { + piper = lib.mkIf config.sysconfig.opts.virtualization.wyoming.piper { - servers.piper = lib.mkIf (!config.sysconfig.opts.virtualization.wyoming.satelliteOnly) { + servers.piper = { enable = true; voice = "en-us-ryan-medium"; uri = "tcp://0.0.0.0:11435"; }; }; - openwakeword = lib.mkIf (!config.sysconfig.opts.virtualization.wyoming.satelliteOnly) { + openwakeword = lib.mkIf config.sysconfig.opts.virtualization.wyoming.openwakeword { enable = true; uri = "tcp://0.0.0.0:11432"; preloadModels = [ @@ -97,7 +109,7 @@ ]; }; - faster-whisper = lib.mkIf (!config.sysconfig.opts.virtualization.wyoming.satelliteOnly) { + faster-whisper = lib.mkIf config.sysconfig.opts.virtualization.wyoming.faster-whisper { servers.whisper = { enable = true; device = "auto"; @@ -107,7 +119,7 @@ }; }; - satellite = { + satellite = lib.mkIf config.sysconfig.opts.virtualization.wyoming.satellite { enable = true; uri = "tcp://0.0.0.0:11431"; #user = "nathan"; diff --git a/system-config/services/wyoming/default.nix b/system-config/services/wyoming/default.nix index 6fcc323..d784c7b 100644 --- a/system-config/services/wyoming/default.nix +++ b/system-config/services/wyoming/default.nix @@ -5,7 +5,19 @@ type = lib.types.bool; default = false; }; - satelliteOnly = lib.options.mkOption { + piper = lib.options.mkOption { + type = lib.types.bool; + default = false; + }; + openwakeword = lib.options.mkOption { + type = lib.types.bool; + default = false; + }; + faster-whisper = lib.options.mkOption { + type = lib.types.bool; + default = false; + }; + satellite = lib.options.mkOption { type = lib.types.bool; default = false; }; @@ -14,16 +26,16 @@ config = lib.mkIf config.sysconfig.opts.wyoming.enable { services.wyoming = { - piper = { + piper = lib.mkIf config.sysconfig.opts.wyoming.piper { - servers.piper = lib.mkIf (!config.sysconfig.opts.wyoming.satelliteOnly) { + servers.piper = { enable = true; voice = "en-us-ryan-medium"; uri = "tcp://0.0.0.0:11435"; }; }; - openwakeword = lib.mkIf (!config.sysconfig.opts.wyoming.satelliteOnly) { + openwakeword = lib.mkIf config.sysconfig.opts.wyoming.openwakeword { enable = true; uri = "tcp://0.0.0.0:11432"; preloadModels = [ @@ -37,7 +49,7 @@ ]; }; - faster-whisper = lib.mkIf (!config.sysconfig.opts.wyoming.satelliteOnly) { + faster-whisper = lib.mkIf config.sysconfig.opts.wyoming.faster-whisper { servers.whisper = { enable = true; device = "auto"; @@ -47,7 +59,7 @@ }; }; - satellite = { + satellite = lib.mkIf config.sysconfig.opts.wyoming.satellite { enable = true; uri = "tcp://0.0.0.0:11431"; user = "nathan";