Compare commits
No commits in common. "2188954b79aabbf3835ec9af5f1811d672283ece" and "b8e21e6c61d5b969ceac78cacbb53d792bf6017c" have entirely different histories.
2188954b79
...
b8e21e6c61
4 changed files with 2 additions and 103 deletions
|
@ -280,12 +280,6 @@
|
|||
subdomain = "home";
|
||||
openFirewall = true;
|
||||
database = "postgres";
|
||||
|
||||
extensions = {
|
||||
sonos.enable = true;
|
||||
jellyfin.enable = true;
|
||||
wyoming.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
qbittorrent = {
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
./forgejo.nix
|
||||
./searx.nix
|
||||
./home-assistant.nix
|
||||
./wyoming.nix
|
||||
./immich.nix
|
||||
./qbittorent.nix
|
||||
];
|
||||
|
|
|
@ -21,23 +21,6 @@ in {
|
|||
description = "what database do we want to use";
|
||||
default = "builtin";
|
||||
};
|
||||
|
||||
extensions = {
|
||||
sonos = {
|
||||
enable = lib.mkEnableOption "enable the sonos plugin";
|
||||
port = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 1400;
|
||||
description = "what port to use for sonos discovery";
|
||||
};
|
||||
};
|
||||
jellyfin = {
|
||||
enable = lib.mkEnableOption "enable the jellyfin plugin";
|
||||
};
|
||||
wyoming = {
|
||||
enable = lib.mkEnableOption "enable wyoming";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.home-assistant.enable (lib.mkMerge [
|
||||
|
@ -67,9 +50,11 @@ in {
|
|||
"radio_browser"
|
||||
"isal"
|
||||
"zha"
|
||||
"jellyfin"
|
||||
"webostv"
|
||||
"tailscale"
|
||||
"syncthing"
|
||||
"sonos"
|
||||
"analytics_insights"
|
||||
"unifi"
|
||||
"openweathermap"
|
||||
|
@ -95,26 +80,10 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
# TODO: configure /var/lib/hass/secrets.yaml via sops
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"f ${config.services.home-assistant.configDir}/automations.yaml 0755 hass hass"
|
||||
];
|
||||
}
|
||||
(lib.mkIf (config.services.home-assistant.extensions.sonos.enable) {
|
||||
services.home-assistant.extraComponents = ["sonos"];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
config.services.home-assistant.extensions.sonos.port
|
||||
];
|
||||
})
|
||||
(lib.mkIf (config.services.home-assistant.extensions.jellyfin.enable) {
|
||||
services.home-assistant.extraComponents = ["jellyfin"];
|
||||
# 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") {
|
||||
host = {
|
||||
postgres = {
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
{
|
||||
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 = {
|
||||
# Text to speech
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Speech to text
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
openwakeword = {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:10400";
|
||||
preloadModels = [
|
||||
"ok_nabu"
|
||||
];
|
||||
# TODO: custom models
|
||||
};
|
||||
};
|
||||
|
||||
# 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";
|
||||
}
|
||||
];
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue