use nix version of home assistant

This commit is contained in:
2025-08-25 07:21:21 +02:00
parent ac51739c56
commit 2ea7fa983c
2 changed files with 36 additions and 6 deletions

View File

@@ -1,10 +1,39 @@
{ config, ... }:
let
domain = "home.rpqt.fr";
subdomain = "assistant.${domain}";
in
{ {
virtualisation.oci-containers.containers.homeassistant = { services.home-assistant = {
volumes = [ "home-assistant:/config" ]; enable = true;
environment.TZ = "Europe/Paris"; extraComponents = [
image = "ghcr.io/home-assistant/home-assistant:stable"; # Components required to complete the onboarding
extraOptions = [ "analytics"
"--network=host" "google_translate"
"met"
"radio_browser"
"shopping_list"
# For fast zlib compression
"isal"
]; ];
config = {
default_config = { };
http = {
use_x_forwarded_for = true;
trusted_proxies = [ "127.0.0.1" ];
};
};
};
services.nginx.virtualHosts.${subdomain} = {
forceSSL = true;
useACMEHost = "${domain}";
extraConfig = ''
proxy_buffering off;
'';
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.home-assistant.config.http.server_port}";
proxyWebsockets = true;
};
}; };
} }

View File

@@ -10,6 +10,7 @@ let
genepi = { genepi = {
subdomains = [ subdomains = [
"actual" "actual"
"assistant"
"glance" "glance"
"grafana" "grafana"
"images" "images"