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 = {
volumes = [ "home-assistant:/config" ];
environment.TZ = "Europe/Paris";
image = "ghcr.io/home-assistant/home-assistant:stable";
extraOptions = [
"--network=host"
services.home-assistant = {
enable = true;
extraComponents = [
# Components required to complete the onboarding
"analytics"
"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 = {
subdomains = [
"actual"
"assistant"
"glance"
"grafana"
"images"