homeassistant
This commit is contained in:
@@ -258,7 +258,7 @@
|
|||||||
pihole.enable = false; #broken
|
pihole.enable = false; #broken
|
||||||
nextcloud.enable = true;
|
nextcloud.enable = true;
|
||||||
gitea.enable = true;
|
gitea.enable = true;
|
||||||
homeassistant.enable = false;
|
homeassistant.enable = true;
|
||||||
ntfy.enable = false;
|
ntfy.enable = false;
|
||||||
netbird.enable = true;
|
netbird.enable = true;
|
||||||
rustdesk.enable = false; #broken
|
rustdesk.enable = false; #broken
|
||||||
|
|||||||
@@ -13,21 +13,27 @@
|
|||||||
|
|
||||||
config = lib.mkIf config.sysconfig.opts.virtualization.homeassistant.enable {
|
config = lib.mkIf config.sysconfig.opts.virtualization.homeassistant.enable {
|
||||||
|
|
||||||
virtualisation.oci-containers = {
|
containers.home-assistant = {
|
||||||
backend = "docker";
|
|
||||||
containers.homeassistant = {
|
autoStart = true;
|
||||||
autoStart = true;
|
privateNetwork = true;
|
||||||
ports = [ "8123:8123" ];
|
hostAddress = "192.168.100.10";
|
||||||
volumes = [
|
localAddress = "192.168.100.25";
|
||||||
config.sysconfig.opts.virtualization.homeassistant.configvol
|
|
||||||
"/run/dbus:/run/dbus:ro"
|
config = {
|
||||||
];
|
|
||||||
environment.TZ = "America/Chicago";
|
services.home-assistant = {
|
||||||
image = "ghcr.io/home-assistant/home-assistant:stable"; # Warning: if the tag does not change, the image will not be updated
|
enable = true;
|
||||||
extraOptions = [
|
|
||||||
"--network=host"
|
openFirewall = true;
|
||||||
#"--device=/dev/ttyACM0:/dev/ttyACM0" # Use this for external devices e.g. zigbee
|
|
||||||
];
|
extraComponents = [
|
||||||
|
"wyoming"
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
autoStart = true;
|
autoStart = true;
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
hostAddress = "192.168.100.10";
|
hostAddress = "192.168.100.10";
|
||||||
localAddress = "192.168.100.21";
|
localAddress = "192.168.100.27";
|
||||||
forwardPorts = [
|
forwardPorts = [
|
||||||
{
|
{
|
||||||
containerPort = 21115;
|
containerPort = 21115;
|
||||||
|
|||||||
123
system-config/services/containers/wyoming/default.nix
Normal file
123
system-config/services/containers/wyoming/default.nix
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
|
options.sysconfig.opts.virtualization.wyoming = {
|
||||||
|
enable = lib.options.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
satelliteOnly = lib.options.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.sysconfig.opts.virtualization.wyoming.enable {
|
||||||
|
|
||||||
|
containers.n8n = {
|
||||||
|
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = "192.168.100.10";
|
||||||
|
localAddress = "192.168.100.26";
|
||||||
|
|
||||||
|
bindMounts = {
|
||||||
|
"/dev/nvidia0" = {
|
||||||
|
hostPath = "/dev/nvidia0";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
"/dev/nvidiactl" = {
|
||||||
|
hostPath = "/dev/nvidiactl";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
"/dev/nvidia-uvm" = {
|
||||||
|
hostPath = "/dev/nvidia-uvm";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
"/dev/nvidia-modeset" = {
|
||||||
|
hostPath = "/dev/nvidia-modeset";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
"/dev/nvidia-uvm-tools" = {
|
||||||
|
hostPath = "/dev/nvidia-uvm-tools";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
allowedDevices = [
|
||||||
|
{
|
||||||
|
node = "/dev/nvidia0";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/nvidiactl";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/nvidia-uvm";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/nvidia-modeset";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
node = "/dev/nvidia-uvm-tools";
|
||||||
|
modifier = "rw";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [ 11431 11432 11433 11435 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.wyoming = {
|
||||||
|
|
||||||
|
piper = {
|
||||||
|
|
||||||
|
servers.piper = lib.mkIf (!config.sysconfig.opts.virtualization.wyoming.satelliteOnly) {
|
||||||
|
enable = true;
|
||||||
|
voice = "en-us-ryan-medium";
|
||||||
|
uri = "tcp://0.0.0.0:11435";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
openwakeword = lib.mkIf (!config.sysconfig.opts.virtualization.wyoming.satelliteOnly) {
|
||||||
|
enable = true;
|
||||||
|
uri = "tcp://0.0.0.0:11432";
|
||||||
|
preloadModels = [
|
||||||
|
"alexa"
|
||||||
|
"hey_jarvis"
|
||||||
|
"ok_nabu"
|
||||||
|
];
|
||||||
|
threshold = 0.5;
|
||||||
|
customModelsDirectories = [
|
||||||
|
#./wake_words
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
faster-whisper = lib.mkIf (!config.sysconfig.opts.virtualization.wyoming.satelliteOnly) {
|
||||||
|
servers.whisper = {
|
||||||
|
enable = true;
|
||||||
|
device = "auto";
|
||||||
|
language = "en";
|
||||||
|
model = "medium.en";
|
||||||
|
uri = "tcp://0.0.0.0:11433";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
satellite = {
|
||||||
|
enable = true;
|
||||||
|
uri = "tcp://0.0.0.0:11431";
|
||||||
|
#user = "nathan";
|
||||||
|
vad.enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -12,7 +12,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.sysconfig.opts.wyoming.enable {
|
config = lib.mkIf config.sysconfig.opts.wyoming.enable {
|
||||||
|
|
||||||
services.wyoming = {
|
services.wyoming = {
|
||||||
|
|
||||||
piper = {
|
piper = {
|
||||||
@@ -41,7 +40,7 @@
|
|||||||
faster-whisper = lib.mkIf (!config.sysconfig.opts.wyoming.satelliteOnly) {
|
faster-whisper = lib.mkIf (!config.sysconfig.opts.wyoming.satelliteOnly) {
|
||||||
servers.whisper = {
|
servers.whisper = {
|
||||||
enable = true;
|
enable = true;
|
||||||
#device = "cuda";
|
device = "auto";
|
||||||
language = "en";
|
language = "en";
|
||||||
model = "medium.en";
|
model = "medium.en";
|
||||||
uri = "tcp://0.0.0.0:11433";
|
uri = "tcp://0.0.0.0:11433";
|
||||||
|
|||||||
Reference in New Issue
Block a user