use nix version of home assistant
This commit is contained in:
@@ -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;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ let
|
|||||||
genepi = {
|
genepi = {
|
||||||
subdomains = [
|
subdomains = [
|
||||||
"actual"
|
"actual"
|
||||||
|
"assistant"
|
||||||
"glance"
|
"glance"
|
||||||
"grafana"
|
"grafana"
|
||||||
"images"
|
"images"
|
||||||
|
|||||||
Reference in New Issue
Block a user