home-assistant docker

This commit is contained in:
2026-01-26 16:34:30 -06:00
parent 94ae66c7eb
commit bbd135bad9
5 changed files with 44 additions and 14 deletions

View File

@@ -29,6 +29,21 @@
}; };
}; };
ollama-remote = {
name = "Ollama (remote)";
npm = "@ai-sdk/openai-compatible";
options.baseURL = "https://ollama.esotericbytes.com/v1";
models = {
"ministral-3:8b".name = "Ministral 3 8B";
"llama3.2".name = "Llama 3.2";
"qwen3:8b".name = "Qwen 3";
};
};
}; };
}; };
}; };

View File

@@ -79,7 +79,7 @@
pihole.enable = true; pihole.enable = true;
ollama.enable = true; ollama.enable = true;
searxng.enable = true; searxng.enable = true;
home-assistant.enable = false; home-assistant.enable = true;
n8n.enable = true; n8n.enable = true;
}; };

View File

@@ -1,4 +1,12 @@
{ config, lib, ... }: { { config, lib, ... }: let
hostPort = 9003;
subdomain = "hass";
name = "home-assistant";
in {
options.sysconfig.docker.home-assistant.enable = with lib; mkOption { options.sysconfig.docker.home-assistant.enable = with lib; mkOption {
type = with types; bool; type = with types; bool;
@@ -9,7 +17,7 @@
networking.firewall.interfaces = { networking.firewall.interfaces = {
"ve-traefik" = { "ve-traefik" = {
allowedTCPPorts = [ 9003 ]; allowedTCPPorts = [ hostPort ];
}; };
}; };
@@ -19,32 +27,35 @@
# unstable, waiting for 26.05 # unstable, waiting for 26.05
#pull = "newer"; #pull = "newer";
hostname = "hass.esotericbytes.com"; hostname = "${subdomain}.esotericbytes.com";
networks = [ networks = [
"docker-main" "docker-main"
]; ];
labels = { labels = {
"traefik.http.routers.home-assistant.entrypoints" = "localsecure"; "traefik.http.routers.${name}.entrypoints" = "localsecure";
"traefik.http.routers.home-assistant.rule" = "Host(`hass.esotericbytes.com`)"; "traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
"traefik.http.routers.home-assistant.service" = "home-assistant"; "traefik.http.routers.${name}.service" = "${name}";
"traefik.http.routers.home-assistant.tls.certResolver" = "cloudflare"; "traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
"traefik.http.services.home-assistant.loadbalancer.server.url" = "http://192.168.100.10:9003"; "traefik.http.services.${name}.loadbalancer.server.url" = "http://192.168.100.10:${builtins.toString hostPort}";
}; };
extraOptions = lib.mkIf config.sysconfig.docker.nvidia [ extraOptions = [
"--ip=192.168.101.6" "--ip=192.168.101.6"
"--TZ=America/Chicago"
]; ];
environment = {
TZ = "America/Chicago";
};
ports = [ ports = [
"9003:8123" "${builtins.toString hostPort}:8123"
]; ];
volumes = [ volumes = [
"/etc/home-assistant/:/config/" "vol_home-assistant:/config/"
]; ];
}; };
}; };

View File

@@ -16,7 +16,10 @@
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
virtualisation = { virtualisation = {
libvirtd.enable = true; libvirtd = {
enable = true;
qemu.swtpm.enable = true;
};
spiceUSBRedirection.enable = true; spiceUSBRedirection.enable = true;
}; };

View File

@@ -8,5 +8,6 @@
}; };
config = lib.mkIf config.sysconfig.virtual-machines.home-assistant.enable { config = lib.mkIf config.sysconfig.virtual-machines.home-assistant.enable {
}; };
} }