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 = {
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ let
|
||||
genepi = {
|
||||
subdomains = [
|
||||
"actual"
|
||||
"assistant"
|
||||
"glance"
|
||||
"grafana"
|
||||
"images"
|
||||
|
||||
Reference in New Issue
Block a user